[Twisted-Python] Controlling the classes being Jellied

Patrik Blommaskog pb_twisted at olga.mine.nu
Wed Jul 2 09:35:48 MDT 2003


> The two important points are:
>
>  1: by overriding .getTypeToCopy(), the sending class can control
> what class
>     name is put into the serialized stream.
>
>  2: pb.setUnjellyableForClass maps a name (the one in the serialized
stream)
>     to a local class. The name can be specified either as a string or as a
>     class. If you don't have access to the the class, just use a string
that
>     matches the one used by the sender. The only caveat is to make sure
the
>     string is unique with respect to packages and modules and such.. in
>     general is should be a "fully qualified" class name.

Smashing! This solved my problems right away.

I am having some problems finding my way around the API docs. The
Copyable.getTypeToCopy() I found eventually, but I still can't find
pb.setUnjellyableForClass in the docs even when I know what to look for.

Thanks a lot for the help, Brian!


- Patrik






More information about the Twisted-Python mailing list