I use IronPython 2.0.

In Program.py I have:
print "hello"
DEBUGMODE=0
.
.
.
import LogMessage

In LogMessage.py I have
from Program import DEBUGMODE

When I run :
ipy Program.py
I observe that "hello" is printed twice: Once when Program.py is run and
next when a symbol from Program.py is imported in LogMessage. If one module
imports another, does it execute all statements in it even if that module
has been loaded before?
What do I need to do to avoid it?

Program.py and LogMessage.py are both in the same folder.

Thanks,
Yash
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to