Show More
@@ -90,7 +90,7 b" def debugx(expr,pre_msg=''):" | |||||
90 | #def debugx(expr,pre_msg=''): pass |
|
90 | #def debugx(expr,pre_msg=''): pass | |
91 |
|
91 | |||
92 | def extract_module_locals(depth=0): |
|
92 | def extract_module_locals(depth=0): | |
93 |
"""Returns (module, locals) of the func |
|
93 | """Returns (module, locals) of the function `depth` frames away from the caller""" | |
94 | f = sys._getframe(depth + 1) |
|
94 | f = sys._getframe(depth + 1) | |
95 | global_ns = f.f_globals |
|
95 | global_ns = f.f_globals | |
96 | module = sys.modules[global_ns['__name__']] |
|
96 | module = sys.modules[global_ns['__name__']] |
General Comments 0
You need to be logged in to leave comments.
Login now