help - python can't find file

darren kirby bulliver at badcomputer.org
Mon May 21 13:09:20 EDT 2007


quoth the enquiring mind:

> - but now I get a error message 21 saying file or directory doesn't
> exist.

You must be in the same directory (in konsole) as the python script for this 
to work, else enter the relative path to the file:

Assuming you are in your home directory (this is where a new konsole will 
start you), and the py scripts are in a directory 'pythondir': 

$ cd pythondir
$ python myscript.py

or:

$ python pythondir/myscript.py

You could also chmod the script to be executable and run it as a regular 
command ...however... I don't mean this to sound like RTFM but I do think 
that you could use some reading on Linux CLI usage. You say you have some 
Linux books?

I say this as my reading of your message indicates your problems lie with 
misunderstanding the shell/paths etc, not with Python itself...

-d  
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972



More information about the Python-list mailing list