[Tutor] running a program
Hello everybody,I have a very simple question: how can I run a script that uses module Tkinter without using IDLE? Thank you,David Yahoo! Music Unlimited - Access over 1 million songs. Try it free.___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] cPickle.load()
hello everybody, I am trying to learn to use Python. Currently, I am reading Michael Dawson's Python Programming for the Absolute Beginner. Right now, I am having the following problem: I try to read all the pickles in a file, but keep on getting the same error: EOFError. This is what the code looks like: import cPickle, shelve print Pickling lists. variety=[sweet,hot,dill] shape=[whole,spear,chip] brand=[Claussen,Heinz,Vlassic] pickle_file=open(pickles1.dat,w) cPickle.dump(variety,pickle_file) cPickle.dump(shape,pickle_file) cPickle.dump(brand,pickle_file) pickle_file.close() print \nUnpickling lists. pickle_file=open(pickles1.dat,rb) for i in pickle_file: i=cPickle.load(pickle_file) print i pickle_file.close() This is what I keep on getting: Pickling lists. Unpickling lists. Traceback (most recent call last): File /Users/davidjimenez/Documents/trypickle, line 20, in -toplevel- i=cPickle.load(pickle_file) EOFError Thank you, David Jimenez __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] cPickle.load()
hello everybody, I am trying to learn to use Python. Currently, I am reading Michael Dawson's Python Programming for the Absolute Beginner. Right now, I am having the following problem: I try to read all the pickles in a file, but keep on getting the same error: EOFError. This is what the code looks like: import cPickle, shelve print Pickling lists. variety=[sweet,hot,dill] shape=[whole,spear,chip] brand=[Claussen,Heinz,Vlassic] pickle_file=open(pickles1.dat,w) cPickle.dump(variety,pickle_file) cPickle.dump(shape,pickle_file) cPickle.dump(brand,pickle_file) pickle_file.close() print \nUnpickling lists. pickle_file=open(pickles1.dat,rb) for i in pickle_file: i=cPickle.load(pickle_file) print i pickle_file.close() This is what I keep on getting: Pickling lists. Unpickling lists. Traceback (most recent call last): File /Users/davidjimenez/Documents/trypickle, line 20, in -toplevel- i=cPickle.load(pickle_file) EOFError Thank you, David Jimenez Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor