How to use imported function to get current globals

1989lzhh 1989lzhh at gmail.com
Sat Jun 7 13:40:04 EDT 2014


Here is the code
m1.py
def f():
    print globals()

m2.py
from m1 import f
f()# how to get current module's globals?






More information about the Python-list mailing list