[Twisted-Python] Problems with PB and Jelly...

Jasper Phillips jasper at peak.org
Wed Mar 19 19:03:32 EST 2003

Hash: SHA1

I'm new to twisted, and attempting to use it for networkable gaming;
unfortunately I've run into some problems.

I have a Perspective <-> Referenceable server/client setup, and am trying to
pass objects between them.  Following the online docs I've set all the
relavent classes to inherit from pb.Copyable + pb.RemoteCopy, and passed them
all to pb.setUnjellyableForClass.

However, I still get "Module not allowed" exceptions raised in
twisted.spread.jelly.py line 523.  Looking more closely, I see that modules
are not allowed unless passed to SecurityOptions.allowModules(), which is
only called from SecurityOptions.allowInstancesOf(), which is not exposed
through pb...

In short I don't see how the example code on:
could possibly work!  Is it indeed necessary to call allowInstancesOf()
directly?  Hopefully I am just missing something... :-)

I'm also unsure what to make of the last bullet under "Things To Watch Out
For" on the above webpage.  It seems unsure whether using __init__ to
initialize transferable objects is ok...  Must I truly go and hack all
my objects to not use __init__, and instead use setCopyableState()?

This, especially when combined with the need to inherit from pb.Copyable +
pb.RemoteCopy, seems onerous when compared to the minimal interface of
pickle.  I would like to be able to simple pass objects of arbitrary classes,
provided I've registered them as UnJellyable.  Hopefully I'm missing
something here as well!

Thanks in advance,
- -Jasper

Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org


More information about the Twisted-Python mailing list