[Pythonmac-SIG] Run Python module directly from Terminal?

Lee Cullens lee_cullens at mac.com
Tue May 24 07:34:55 CEST 2005


Thanks for the vote of confidence Chris.

On May 24, 2005, at 12:56 AM, Chris Barker wrote:

> 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.

Good point - I've been keeping my amateurish utilities separated from  
the more "professional" stuff and more visible in Finder, but it does  
lead to more path issues.   Maybe when I feel more "professional"  
I'll keep some stuff there :~)

>
> 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.
>

Have not had much success yet in using tab other than in WingIDE, but  
with these old fingers I keep trying.

> 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.
>

Had that (http://www.entropy.ch/software/applescript/welcome.html) on  
Panther but have not installed it again yet with Tiger.  Are you  
using it with Tiger?

> -Chris
>
>
>
>
> -- 
> Christopher Barker, Ph.D.
> Oceanographer

Ever deal with Woods Hole (MA) - I worked on an engineering project  
for them many many years ago.

>
> 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