Should pickling of gdk objects work? The example below crashes python
during the pickle.load call (on windows and linux). If I remove
pickle.HIGHEST_PROTOCOL, then pickle.dump throws an exception.
-Brad
------------------------------------
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
import pickle
rect = gtk.gdk.Rectangle(100,100)
print rect.x
file = open('rect', 'wb')
pickle.dump(rect, file, pickle.HIGHEST_PROTOCOL)
file.close()
file = open('rect', 'rb')
rect = pickle.load(file)
print rect.x
file.close()
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/