Executing Python Scripts on Mac using Python Launcher

David Thomas dthomas86 at me.com
Wed Jun 27 13:05:44 EDT 2012


On Tuesday, June 26, 2012 10:48:22 PM UTC+1, Hans Mulder wrote:
> On 26/06/12 22:41:59, Dave Angel wrote:
> > On 06/26/2012 03:16 PM, Hans Mulder wrote:
> >> <SNIP>
> >>
> >>  Python is an executable, and is
> >> typically located in a "bin" directory.  To find out where
> >> it is, type
> >>
> >>     type python
> >>
> >> at the shell prompt (that's the first prompt you get if you
> >> open a Terminal window).
> >>
> >>
> > 
> > That's a typo.  You presumably meant:
> > 
> >     which python
> > 
> 
> No, I meant:
> 
> $ type python
> python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
> 
> 'type' is a bash builtin that tells you how bash would interpret
> a command.  'which' is a separate program, which tells you how
> csh would interpret a command.  For a 'bash' user, 'type' is more
> accurate than 'which'.  For example, 'type' recognizes 'bash'
> builtins.
> 
> -- HansM

I have the following:

Is this why I keep getting an error using launcher?  Also to open the script in terminal do I need to put the following at the beginning of my script:  #!/bin/python

On python.org it states to To run your script from the Terminal window you must make sure that /usr/local/bin is in your shell search path.

How can I make sure that the Python I have installed on my Mac is in my shell search path.

http://www.freeimagehosting.net/saskk

Thanks again and I am sorry for all the questions, I am just getting started on Python



More information about the Python-list mailing list