Hello,
I'd like to use cPickle with wx objects (like my short example above) but it seems not to be as simple as I expected. Is it possible to do this or not ?
Sebastien
>>> import cPickle
>>> import wx
>>> myMenu = wx.Menu()
>>> f=open('test.tst','w')
>>> cPickle.dump(myMenu, f)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Python25\lib\copy_reg.py", line 69, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle PySwigObject objects
>>> f.close()
>>>
And the "cPickle file" :
ccopy_reg
_reconstructor
p1
(cwx._core
Menu
p2
c__builtin__
object
p3
NtRp4
(dp5
S'this'
p6