access interactive namespace from module (shared namespace?)

2008-05-25 Thread Ulrich Dorda
I've got a probably embarrassing trivial problem with namespaces, but couldn't solve it myself nor find an answer in the net. Hopefully one of you guys can help me. What I want to do: Use the interactive shell and e.g define the variable a there. Then load a module and access a from within.

Re: access interactive namespace from module (shared namespace?)

2008-05-25 Thread TeroV
Ulrich Dorda wrote: I've got a probably embarrassing trivial problem with namespaces, but couldn't solve it myself nor find an answer in the net. Hopefully one of you guys can help me. What I want to do: Use the interactive shell and e.g define the variable a there. Then load a module and

Re: access interactive namespace from module (shared namespace?)

2008-05-25 Thread ulrich
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.

Re: access interactive namespace from module (shared namespace?)

2008-05-25 Thread Peter Otten
Ulrich Dorda wrote: I've got a probably embarrassing trivial problem with namespaces, but couldn't solve it myself nor find an answer in the net. Hopefully one of you guys can help me. What I want to do: Use the interactive shell and e.g define the variable a there. Then load a module and

Re: access interactive namespace from module (shared namespace?)

2008-05-25 Thread David C. Ullrich
On Sun, 25 May 2008 03:32:30 -0700 (PDT), [EMAIL PROTECTED] wrote: 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

Re: access interactive namespace from module (shared namespace?)

2008-05-25 Thread ulrich
Thanks a lot to all! Apart from obtaining the solution I was searching for, I learned a lot by studying your answers! Cheers, Ulrich -- http://mail.python.org/mailman/listinfo/python-list