pickling types from pywintypes
Gerhard Häring
gh_pythonlist at gmx.de
Tue Oct 2 19:45:46 EDT 2001
On Tue, Oct 02, 2001 at 08:22:01PM +0000, John S. Yates, Jr. wrote:
> I am developing a network file system redirector and trying to write a
> test framework in Python using the win32all package. To be able to
> script multiple client machines I have a win32 server that runs on my
> slave machines and a master controller test suite runner that
> communicates with the slaves via dopy rpc.
>
> dopy is layered on [c]pickle. The problem I am having is that the
> pywintypes do not seem to be pickleable: [...]
For some types it doesn't make sense to pickle them, file handles, for
example. But if it makes sense and a type cannot currently be pickled,
you can use the copy_reg module to provide a custom
(de)serialization function to the pickle module for that type.
Gerhard
--
mail: gerhard <at> bigfoot <dot> de registered Linux user #64239
web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
More information about the Python-list
mailing list