Request for Enhancement

Samuel A. Falvo II kc5tja at garnet.armored.net
Wed Aug 30 21:46:37 EDT 2000


I have need to process very large text files in Python, but I don't have any
idea how long the files are going to be in real-world situations.  It is
unfortunate that there is no F.eof() function, where F is a Python file.

Here's what I *want*:
	
	while not F.eof():
		l = F.readline()
		...process line...

As it is, I have to do the following:

	l_list = F.readlines()	#note plural
	for line in l_list:
		... process line ...

While this is fine for my test cases, it could consume unacceptable amounts
of memory when fed large text files.

Thanks.

-- 
KC5TJA/6, DM13, QRP-L #1447 | Official Channel Saint, *Team Amiga*
Samuel A. Falvo II	    |
Oceanside, CA		    |



More information about the Python-list mailing list