FTP module file parsing..

Wojtek Walczak gminick at hacker.pl
Thu Dec 5 12:33:03 EST 2002


Dnia 05 Dec 2002 11:24:41 -0500, Wayne Ringling napisał(a):
> this dumps the whole file into the datalist.  I would like to only parse the file line by line and not load the whole thing into the list and also not download it to the machine and then parse it.  Am I crazy for thinking this way or am I missing something?

If you want to parse it, you need to download it.
In your datalist you got lines from file indexed as a counter grows.
So all you need to do to parse your file is:

for line in datalist:
   ... # parsing a line

-- 
[ ] gminick (at) underground.org.pl  http://gminick.linuxsecurity.pl/ [ ]
[ "Po prostu lubie poranna samotnosc, bo wtedy kawa smakuje najlepiej." ]



More information about the Python-list mailing list