Re: linecache and glob

2008-01-07 Thread jo3c
On Jan 4, 5:25 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > jo3c wrote: > > i have a 2000 files with header and data > > i need to get the date information from the header > > then insert it into my database > > i am doing it in batch so i use glob.glob('/mydata/*/*/*.txt') > > to get the date on

Re: linecache and glob

2008-01-04 Thread Fredrik Lundh
jo3c wrote: > i have a 2000 files with header and data > i need to get the date information from the header > then insert it into my database > i am doing it in batch so i use glob.glob('/mydata/*/*/*.txt') > to get the date on line 4 in the txt file i use > linecache.getline('/mydata/myfile.txt/,

Re: linecache and glob

2008-01-03 Thread Shane Geiger
hi everyone happy new year! > im a newbie to python > i have a question > by using linecache and glob > how do i read a specific line from a file in a batch and then insert > it into database? > > because it doesn't work! i can't use glob wildcard with linecache >

Re: linecache and glob

2008-01-03 Thread jo3c
i have a 2000 files with header and data i need to get the date information from the header then insert it into my database i am doing it in batch so i use glob.glob('/mydata/*/*/*.txt') to get the date on line 4 in the txt file i use linecache.getline('/mydata/myfile.txt/, 4) but if i use linecac

Re: linecache and glob

2008-01-03 Thread Jeremy Dillworth
linecache.getline(filename, 4) Maybe you could explain more about what you are trying to do and we could help more? Hope this helps, Jeremy On Jan 3, 10:02 pm, jo3c <[EMAIL PROTECTED]> wrote: > hi everyone happy new year! > im a newbie to python > i have a question > by using li

linecache and glob

2008-01-03 Thread jo3c
hi everyone happy new year! im a newbie to python i have a question by using linecache and glob how do i read a specific line from a file in a batch and then insert it into database? because it doesn't work! i can't use glob wildcard with linecache >>> import linecache &g