how to pickle unpicklable objects

Guy Lateur guy.lateur at
Fri Sep 23 12:44:41 CEST 2005

Hi all,

I've been writing an application containing a lot of settings which can be 
changed by the user. I'm using wx.Config to read/write these settings (to 
the windows registry). This means I can only store strings, ints and floats.

However, it would be very convenient if I could also store more general 
objects. It seems to work for wx.Colour, but not for wx.Font. It raises a 
"TypeError: can't pickle PySwigObject objects".

Does anybody a way to get around this? Is there some other module that would 
allow writing general (small) objects to the registry? Some sort of 
serialiser or something?


More information about the Python-list mailing list