Hi, Richard Owlett wrote: > The launching instructions were to do > cd /path/to/script > then > python script.py > I thought I could "simplify" my life by doing > export PATH=$PATH:/path/to/script > and then launch by doing just doing > python script.py > > That FAILED to find script.py .
PATH is a convention of shells like bash or dash, not of Python. In your examples it lets the shell parser find /usr/bin/python from "python". It does not influence the processing of the further arguments like "script.py". (In this case "script.py" is not processed further. But it could be if you'd surround it by shell magic. Like: "$HOME"/script.py ) What /usr/bin/python does with the word "script.py" is its own business. Your observations give the impression that it is used as normal file path. man 1 python iconfirms this by saying: INTERPRETER INTERFACE [...] when called with a file name argument or with a file as standard input, it reads and executes a script from that file; [...] So to avoid the cd command with absolute path, you would have to give the script address as absolute path: python /path/to/script/script.py Have a nice day :) Thomas