[Pythonmac-SIG] Macintosh Native Python Install

Christopher Barker Chris.Barker at noaa.gov
Mon Mar 2 21:21:35 CET 2009


REH wrote:
> Using the Mac Leopard NATIVE installation of the Python 2.5 interpreter, 
> called out of the Terminal UNIX command line (i.e. NOT through the 
> X-code machinery), is it possible to pipe or pass in a text file 
> containing Python code?

the Apple one is a normal old python install -- just a particular 
version, so you can do all the same things with it.


>  Or is this literally a type-as-you-go-only  interpreter?


Of course not:

python NameOfScript.py

will run the script.

python -c "print 'something' "

will run python code directly.

or you can put a #! line at the top of your main python file:

#!/usr/bin/env python

and make it executable:

chmod a+x ThePythonFile.py

and you can just run it:

./ThePythonFile.py

> Alternative 2:  If Python.org distributions are the best way to go,

they aren't any different in that sense, but you do get Unversal support 
and newer version, and more packages have binaries built for them.


> recommendations on 2.5

very robust, stable and well supported by external packages

  vs. 2.6

Almost as godo, but I think there are still some external packages not 
supported (is there a binary PIL anywhere, for instance?)

 > vs. 3.x?

Still pretty new -- it's probably robust, but there are many fewer 
external packages supported.


-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (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