rexec question

Ralf Doering ralf.doering at
Thu Aug 5 08:50:12 CEST 1999

Hello again,
it seems that I did not really understand how to work with the rexec
The problem is that I do not know how to access an object defined in
the *calling* namespace inside the r_exec/r_eval call like in the
following example:

import rexec

class foo:
    def start(self):
        print "foo running"

def rexectest():
    o = foo()
    filter = rexec.RExec()

>>> rexectest()
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "", line 11, in rexectest
  File "/wrk2/tele2/doering/gnu/lib/python1.5/", line 253, in r_exec
    exec code in m.__dict__
  File "<string>", line 1, in ?
NameError: o

Any hints for a newbie?

No sig -- no fun

More information about the Python-list mailing list