February 16th, 2005, 03:04 PM
You seem to be on the right track anyway: using the from-module-import statement. If you want to import from __main__ then you need to change main
in your import statement.
Still, importing something into a module from __main__ seems like a bad idea to me. Personally I would put the variables definition inside the com
module and then import it into the __main__ program.
Note: that you don't need to define your variable as being global since it is being defined in the global namespace i.e.
>>> global a
>>> a = 1
>>> b = 2
>>> def h():
>>> def i():
You also seem to be overwriting the com module with your own variable named com
Hope this helps,
programming language development: www.netytan.com – Hula