Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72920 > unrolled thread
| Started by | 1989lzhh <1989lzhh@gmail.com> |
|---|---|
| First post | 2014-06-08 01:40 +0800 |
| Last post | 2014-06-08 01:40 +0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
How to use imported function to get current globals 1989lzhh <1989lzhh@gmail.com> - 2014-06-08 01:40 +0800
| From | 1989lzhh <1989lzhh@gmail.com> |
|---|---|
| Date | 2014-06-08 01:40 +0800 |
| Subject | How to use imported function to get current globals |
| Message-ID | <mailman.10854.1402162815.18130.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web