I just started learning Python.
In c:\Python27 I have created my first hello.py script.
It works when I type in the command line:
c:\Python27 python hello.py
Now I created another script, but in a different directory. This directory is in the PYTHONPATH.
mymodule.py:
print("general")
def fone():
print("special line")
When I extend the hello.py script:
import mymodule
print "Hello"
mymodule.fone()
The mymodule script/module gets found and is correctly imported, so the PYTHONPATH seems to be ok.
But when I type at the command line:
c:\Python python mymodule.py
I get the error:
python: can't open file 'mymodule.py': [Errno 2] No such file or directory
Why is this?
Thanks alot for help