Thanks for the reply,

Of course the suggested solution is working and good, but a bit
complicated. The module/function where i need to access the variable
value from the interactive shell is burried quite deep and I would
nedd to hand the locals() quite often from one module to another.
Furthermore it makes the call function slightly more complicated, as
the locals()-argunment has to be given every time.

I was hoping for something a bit different: If I wanted to access a
value b from another module "utest2.py", I would simply need to type
in utest.py: import utest2; print 2*utest2.b
Isn't there a name for the interactive namespace (like here the
utest2), which I can use to access the variable without handing the
whole dictionary?

Cheers,

Ulrich



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to