C-API: Get scope in function
googler.1.webmaster at spamgourmet.com
Sun Jan 17 14:23:03 CET 2010
I have a small problem how to get the scope from a C-API function.
Check out this code snippet:
variable = 3
print variable #output: 3
print globals() # ... 'variable': 3, ...
In my case I know there is a variable in the scope where this function
is called from, but I dont know how to get it.
PyObject *MyFunction_Test(PyObject* self, PyObject *args, PyObject
Is it possible to get the dictionary of the scope where this function
is called from?
Thanks a lot!!
More information about the Python-list