faulkner wrote:

> sys._getframe(1).f_locals

Brilliant. That one's pretty well hidden and labeled "should be used
for internal and specialized purposes only". Guess I'm officially
special. :-)

To implement this with minimal requirements on the author of the
plugin, I created a function in master.py:
def GetKey():
    ns = sys._getframe(2).f_locals
    return ns['VALUABLE']

Now the plugin gets the useful info simply:
import master
print master.GetKey()

Though it would be nice if this info could somehow be "injected" into
the namespace of plugin.py without this, I can live with two lines.

Thanks!

-- robin

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to