Newbie - EOF question

maalokam at my-deja.com maalokam at my-deja.com
Wed Oct 11 19:49:14 EDT 2000


Hi,

I just started programming in python and the following piece of code
gives me an EOFError. Was wondering if someone could help ?

Thanks in advance,
Maalokam

--- CODE ---
f = open("tmpfile")
x = cPickle.load(f)
while x:
   print x
   x = cPickle.load(f)

--- ERROR LOG ---
Traceback (innermost last):
  File "./test.py", line 16, in ?
    Main()
  File "./test.py", line 14, in Main
    x = cPickle.load(f1)
EOFError




Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list