Re: [Tutor] sensing EOF in Python 3.1

2011-11-23 Thread Steven D'Aprano
Cranky Frankie wrote: From: Peter Otten <__pete...@web.de> wrote: snip <> Thanks Peter, that was it. I was treating pickle like standard file i/o when it's not that at all. I don't understand what you mean by this. Pickle does standard file I/O in the same way that opening a JPEG in an image

Re: [Tutor] sensing EOF in Python 3.1

2011-11-23 Thread Steven D'Aprano
Cranky Frankie wrote: I'm reading in a pickled file. The program works but I'm having trouble sensing end of file. Here's the program: [...] Traceback (most recent call last): File "D:\MyDocs\Python\pickle_in.py", line 21, in read_file = pickle.load(pickle_file)# read the next re

Re: [Tutor] sensing EOF in Python 3.1

2011-11-23 Thread Wayne Werner
On Wed, Nov 23, 2011 at 12:03 PM, Cranky Frankie wrote: > [...] > The reason why I'm "pickling" is I'm trying to include information on > Python data structures in the presentaton I'm preparing. [...] > In your context why not just use modules? # data.py Qb_dict = {"Montana": ["Joe", "Montana"

Re: [Tutor] sensing EOF in Python 3.1

2011-11-23 Thread Peter Otten
Cranky Frankie wrote: > I'm reading in a pickled file. The program works but I'm having > trouble sensing end of file. Here's the program: > > # > # pickle_in.py > # program to read in a pickled file > # > # Frank L. Palmeri > # > > import pickle # import the pi