[Twisted-Python] Controlling the classes being Jellied

Brian Warner warner at lothar.com
Tue Jul 8 21:29:08 MDT 2003


"Patrik Blommaskog" <pb_twisted at olga.mine.nu> writes:

> 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.

You've probably already found it by now, but for the benefit of archive
readers: setUnjellyableForClass() is actually defined in the
twisted.spread.jelly module. Several PB things are defined in one of
(banana.py, jelly.py, flavors.py, spread.py) and then imported into the
others. I usually end up doing the "big grep" to find the actual definition:

 find ~/stuff/Twisted -type f |xargs grep setUnjellyableForClass |grep def

Some of it is for historical reasons, some of it has to do with the most
appropriate place for the implementation not always being the most
convenient place for use.

In general, banana.py is the lowest level token-to-bytestream layer,
jelly.py is the object serialization that sits above it. spread.py is where
the Broker class is implemented (as well as utility functions like
pb.Connect and pb.getObjectAt), and flavors.py covers the Referenceable /
Copyable / Cacheable subclasses.

cheers,
 -Brian




More information about the Twisted-Python mailing list