[pypy-dev] cpy object space

Jiwon Seo seojiwon at gmail.com
Sat Jul 15 22:26:23 CEST 2006


Never mind. I just heard that cpy obj space is for mixed module translation.
I thought I'd try thunk obj space with cpy obj space, but I rather not. ;)

-jiwon

On 7/14/06, Jiwon Seo <seojiwon at gmail.com> wrote:
> pypy/bin/py.py does not work with cpy object space
>
> [llcoolj] bin > ./py.py -o cpy
> [cbuild:execute] cc -O2 -pthread -I/usr/include/python2.4 -c
> ctypesplatcheck_0.c -o ctypesplatcheck_0.o
> [cbuild:execute] cc -pthread /tmp/usession-23/ctypesplatcheck_0.o -lm
> -lpthread -o /tmp/usession-23/ctypesplatcheck_0
> Traceback (most recent call last):
>  File "./py.py", line 204, in ?
>    sys.exit(main_(sys.argv))
>  File "./py.py", line 82, in main_
>    space.setitem(space.sys.w_dict,space.wrap('executable'),space.wrap(argv[0]))
> AttributeError: 'CPyObjSpace' object has no attribute 'sys'
>
> Having almost only introductory knowledge of pypy, I thought naively
> following might solve the problem
>
> class CPyObjSpace(baseobjspace.ObjSpace):
>    def initialize(self):
>        self.config.objspace.geninterp = False
>        self.wrap_cache = {}
>        self.sys = self.getbuiltinmodule("sys") ##### <-- adding just this line
>
>
> but now it errors that it can't find w_dict attribute in space.sys
> (py.py:main_() #82)  - still space.sys is W_Object. Maybe I need to
> transform it as proper pypy interpreter module?
>



More information about the Pypy-dev mailing list