pickle with constant filesize
Thomas Thiele
thiele at muc.das-werk.de
Wed May 17 13:01:56 EDT 2000
Hallo!
I want to pickle different instances (with different datas) of a class
to a file.
But I how can I realize that every file has exact the same size (every
time when I pickle such a instance of a class)?
How can I calculate the size of the pickle file?
class Myclass:
def __init__(self):
self.a = 0
self.b = 0
self.c = []
...
x1 = Myclass()
x2 = Myclass()
x1.c = [1]
x2.c = [1,2,3,4,5]
Any Ideas?
Thanks Thomas
More information about the Python-list
mailing list