Re: Extract Text Table From File

2012-09-05 Thread Tim Chase
[trimming out a bunch of superfluous text so the thread is actually readable] On 09/05/12 08:08, Ramchandra Apte wrote: > On Monday, 27 August 2012 15:42:14 UTC+5:30, Laszlo Nagy wrote: >> On 2012-08-27 11:53, Huso wrote: >>> I am trying to extract some text table data from a log file >> >> fin =

Re: Extract Text Table From File

2012-09-05 Thread Ramchandra Apte
On Monday, 27 August 2012 15:42:14 UTC+5:30, Laszlo Nagy wrote: > On 2012-08-27 11:53, Huso wrote: > > > Hi, > > > > > > I am trying to extract some text table data from a log file. I am trying > > different methods, but I don't seem to get anything to work. I am kind of > > new to python as

Re: Extract Text Table From File

2012-08-27 Thread Tim Chase
On 08/27/12 04:53, Huso wrote: > Below is just ONE block of the traffic i have in the log files. There will be > more in them with different data. > > ROUTES TRAFFIC RESULTS, LSR > TRG MP DATE TIME > 37 17 120824 > > R TRAFF NBIDS CCONG NDV ANBLO MHTIME NBANSW > A

Re: Extract Text Table From File

2012-08-27 Thread Laszlo Nagy
On 2012-08-27 13:23, Huso wrote: Hi, There can be any number of blocks in the log file. I distinguish the block by the start header 'ROUTES TRAFFIC RESULTS, LSR' and ending in 'END'. Each block will have a unique [date + time] value. I tried the code you mentioned, it works for the data part.

Re: Extract Text Table From File

2012-08-27 Thread Huso
Hi, There can be any number of blocks in the log file. I distinguish the block by the start header 'ROUTES TRAFFIC RESULTS, LSR' and ending in 'END'. Each block will have a unique [date + time] value. I tried the code you mentioned, it works for the data part. But I need to get the TRG, MP, DATE

Re: Extract Text Table From File

2012-08-27 Thread Laszlo Nagy
Hi, Thank you for the information. The exact way I want to extract the data is like as below. TRG, MP and DATE and TIME is common for that certain block of traffic. So I am using those and dumping it with the rest of the data into sql. Table will have all headers (TRG, MP, DATE, TIME, R, TRAFF

Re: Extract Text Table From File

2012-08-27 Thread Huso
On Monday, August 27, 2012 3:12:14 PM UTC+5, Laszlo Nagy wrote: > On 2012-08-27 11:53, Huso wrote: > > > Hi, > > > > > > I am trying to extract some text table data from a log file. I am trying > > different methods, but I don't seem to get anything to work. I am kind of > > new to python as w

Re: Extract Text Table From File

2012-08-27 Thread Laszlo Nagy
On 2012-08-27 11:53, Huso wrote: Hi, I am trying to extract some text table data from a log file. I am trying different methods, but I don't seem to get anything to work. I am kind of new to python as well. Hence, appreciate if someone could help me out. # # Write test data to test.txt # da

Extract Text Table From File

2012-08-27 Thread Huso
Hi, I am trying to extract some text table data from a log file. I am trying different methods, but I don't seem to get anything to work. I am kind of new to python as well. Hence, appreciate if someone could help me out. Below is just ONE block of the traffic i have in the log files. There wil