[Pythonmac-SIG] Can't run Python scripts from Terminal

Paul Berkowitz berkowit@silcom.com
Mon, 14 Apr 2003 00:24:06 -0700


On 4/14/03 12:08 AM, "Brian Lenihan" <brian_l@mac.com> wrote:

>> [250-166:~] berkowit% python importSys.py
>> python: can't open file 'importSys.py'
> 
> Unless you add "dot" to your default path this won't work unless you
> do python ./ImportSys.py

Actual it's not in the working directory at the moment. It's in a directory
where I keep all my .py files, a subfolder in my user Scripts folder. The
great thing is I can now import modules from there without using the file
path, just the module name, no matter where my working directory is. That's
either because I have that directory included in the XML code in
~/.MacOSX/environment.plist; or else because it's in the setenv PATH
specified by the ~/Library/init/tcsh/path file. I'm not sure which - I'll
have to remove each in turn and log out and in to check. was kind of hoping
I could also run scripts in that same directory without specifying the full
path but just the file name.
> 
>> [250-166:~] berkowit% importSys.py
>> importSys.py: Command not found.
> 
> Same here.  ./importSys.py

Not at the moment (same as above).
> 
> The output below won't be relevant (in the context I'm looking for)
> until
> you can run the script without specifying what should run it or where
> it is.
> 

That's what's not working.


-- 
Paul Berkowitz