import and the WSH
cory at c-riddell.com
cory at c-riddell.com
Mon Apr 30 09:44:59 EDT 2001
I have a file called msg.pys that contains one function:
def Message(msg):
WScript.Echo(msg)
I have a second file foo.pys that has two lines:
from msg import Message
Message("hello")
When I run foo.pys (under wscript.exe), it doesn't work. It pops up
a box saying "NameError: global name 'WScript' is not defined". If I
put the Message() function inside of my test.pys file, everything
works fine.
Sorry for such a simple question, but this has had me stumped for too
long.
-cory
More information about the Python-list
mailing list