Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72920
| Subject | How to use imported function to get current globals |
|---|---|
| From | 1989lzhh <1989lzhh@gmail.com> |
| Date | 2014-06-08 01:40 +0800 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10854.1402162815.18130.python-list@python.org> (permalink) |
Here is the code
m1.py
def f():
print globals()
m2.py
from m1 import f
f()# how to get current module's globals?
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
How to use imported function to get current globals 1989lzhh <1989lzhh@gmail.com> - 2014-06-08 01:40 +0800
csiph-web