Adding an object to another module's globals in python

Posted by noam on Stack Overflow See other posts from Stack Overflow or by noam
Published on 2010-03-09T04:04:24Z Indexed on 2010/03/09 4:06 UTC
Read the original article Hit count: 202

Filed under:
|

I know this is very evil, but is it possible to add an object to another module's globals, something like:

#module dog.py
import cat
cat.globals.addVar('name','mittens')

and

#module cat.py
print name #mittens

© Stack Overflow or respective owner

Related posts about python

Related posts about globals