Newbie: problem with own module
Steven Taschuk
staschuk at telusplanet.net
Thu Feb 20 05:04:07 EST 2003
Quoth Matthias Stern:
[...]
> I tried to set a "import WS" command into file boo.py, too. But it didn't
> help. What am I doing wrong?
Dunno; works fine here. Here's what I did, based on your report:
$ cat *.py
# boo.py
import WS
def init(name):
print name
WS.SetRunMode(1)
# main.py
import boo
def main():
boo.init('something')
main()
# WS.py
def SetRunMode(n):
print n
$ python main.py
something
1
$
Try using exactly these files and see if it works. If it doesn't,
tell us what happens. If it does, modify these files a bit at a
time to make them closer to your files, testing the result after
each change, and let us know at what point it breaks.
--
Steven Taschuk staschuk at telusplanet.net
Every public frenzy produces legislation purporting to address it.
(Kinsley's Law)
More information about the Python-list
mailing list