[Pythonmac-SIG] Run Python module directly from Terminal?
Chris Barker
Chris.Barker at noaa.gov
Tue May 24 06:56:45 CEST 2005
Hi Lee,
It looks like you've got it pretty well figured out, but the one thing
that I'd add is the question of whether there is any need to put these
in a special directory.
I put all my utilities in /usr/local/bin, which should be on your path
for all sorts of reasons anyway.
I also tend to remove the ".py" from the end of a script that I'm using
in this way. I just find it cleaner to type:
ConvertFile AtoB.txt
The shell will look at the #! line to figure out what to do, so the .py
isn't required.
By the way, make sure to practice using the <tab> key for command and
filename completion at the command prompt...it'll save you a lot of typing.
Also there's a little utility: "Open Terminal Here" on the net somewhere
that lets you put a button in the finder that will open a terminal
window, and cd it to the current folder in the finder--very handy.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Pythonmac-SIG
mailing list