You didn't say what operating system, but in general terms, the python
application has to know how to find your python module, say 'foo.py'. This
means
that the directory where foo.py is located must be on the system path or
PYTHONPATH.
One simple way to do this is to navigate at the command prompt to the directory
that contains your module, and then execute "python foo.py". In this way
python uses the current directory as the current working directory (cwd);
python starts looking in this directory for your module.
Another way is to examine what's on your system path. At the command prompt,
launch python and then enter these two commands:
>>> import sys
>>> for i in sys.path:
print i
You'll get a list something like this. This list is where python is looking
for foo.py. If not in one of these directories, python probably won't find
your module (in general).
C:\Python25\Lib\idlelib
C:\Python25\lib\site-packages\ets-3.2.0-py2.5.egg
C:\Python25\lib\site-packages\etsdevtools-3.0.2-py2.5-win32.egg
C:\Python25\lib\site-packages\etsprojecttools-0.5.0-py2.5.egg
C:\Python25\lib\site-packages\mayavi-3.2.0-py2.5-win32.egg
C:\Python25\lib\site-packages\scimath-3.0.3-py2.5-win32.egg
C:\Python25\lib\site-packages\setupdocs-1.0.2-py2.5.egg
C:\Python25\lib\site-packages\traits-3.1.0-py2.5-win32.egg
C:\WINNT\system32\python25.zip
C:\Python25\DLLs
C:\Python25\lib
C:\Python25\lib\plat-win
C:\Python25\lib\lib-tk
C:\Python25
C:\Python25\lib\site-packages
C:\Python25\lib\site-packages\itk\module\Python
C:\Python25\lib\site-packages\PIL
C:\Python25\lib\site-packages
C:\Python25\lib\site-packages\gtk-2.0
C:\Python25\lib\site-packages\win32
C:\Python25\lib\site-packages\win32\lib
C:\Python25\lib\site-packages\Pythonwin
Hunt
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor