How to use imported function to get current globals
Ned Batchelder
ned at nedbatchelder.com
Sat Jun 7 18:20:59 EDT 2014
On 6/7/14 1:40 PM, 1989lzhh wrote:
> Here is the code
> m1.py
> def f():
> print globals()
>
> m2.py
> from m1 import f
> f()# how to get current module's globals?
>
Looking at the code you have posted in your two messages so far, it
seems like you are building something very interesting and ambitious.
Do you mind talking a bit about what it is?
--
Ned Batchelder, http://nedbatchelder.com
More information about the Python-list
mailing list