Pickling C objects

Fred L. Drake fdrake at cnri.reston.va.us
Tue Jul 13 15:59:56 EDT 1999


Stuart Reynolds writes:
 > I'm writing some new Python classes with a C implementation. How do you
 > make a C object pickleable?

  Take a look at the source for the parser module in the standard
source distribution; it uses the copy_reg module to register a
mechanism to support pickling.  It worked when I wrote it, but I
haven't tried it lately.  (A good candidate for a regression test!)


  -Fred

--
Fred L. Drake, Jr.	     <fdrake at acm.org>
Corporation for National Research Initiatives




More information about the Python-list mailing list