LOL, try...except is a good idea.
i fix it  lick this:

############
with open("data2.pickle","rb") as file_stream:
    c = 0
    while True:
        try:
            i = cPickle.load(file_stream)
            print i
            c += 1
        except:
            print "Numer of pickled objects is %s." %c
            break
#############
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to