global vars across modules
Roy Smith
roy at panix.com
Sun Apr 22 15:48:23 EDT 2012
In article
<2652842.660.1335123578432.JavaMail.geo-discussion-forums at pbckz3>,
mamboknave at gmail.com wrote:
> I need to use global var across files/modules:
[...]
> Question:
> How can I access to the global 'a' in file_2 without resorting to the whole
> name 'file_1.a' ?
Answer 1: You can't.
Answer 2: You might want to look at thread local storage
(http://docs.python.org/library/threading.html#threading.local).
Answer 3: Are you sure you really want to do this?
More information about the Python-list
mailing list