[pypy-dev] Circular reference when importing struct from a pypy sandbox.

Jonathan Slenders jonathan at slenders.be
Sat Jul 7 19:28:21 CEST 2012


Thanks Amaury,

That's right. I had /bin/pypy/module in my path.

Am I correct in assuming that there does not exist a _struct.py yet for the
pypy sandbox?
/lib-python/2.7/struct.py includes _struct.

The problem was that I'd like to use a json library for passing messages
between the sandbox and it's hypervisor.
Now I patched simplejson to not use the struct and decimal libraries. And
that works wonderful, but it would be even better if I could use the plain
original simplejson. :)


Jonathan



2012/7/7 Amaury Forgeot d'Arc <amauryfa at gmail.com>

> 2012/7/7 Jonathan Slenders <jonathan at slenders.be>:
> > Not sure whether this is sandbox related, but I get a circular reference
> > when I want to import struct.py
> > The problem seems to be in the MixedModule import which get to import
> > himself somehow...
> > Anyone here who likes to take a look at the trackback below?
> >
> > Actually, I'm not entirely sure whether I have the correct sys.path
> inside
> > the sandbox.
> > But anyway, I already had a great experience with the sandboxing mode.
> > (Right now, I'm rewriting sandlib to something usable in Twisted Matrix,
> > amazing technologies they are.)
>
> It seems you have the /bin/pypy/module directory in your sys.path.
> Did you set it manually?
> Could you remove it and try again?
>
>
> --
> Amaury Forgeot d'Arc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120707/b1ae40fe/attachment.html>


More information about the pypy-dev mailing list