Executing Python Scripts on Mac using Python Launcher

David Thomas dthomas86 at me.com
Tue Jun 26 13:19:45 EDT 2012


I have installed Python 2.7.3 from Python.org also in Terminal it states that I have 2.7.3.
How can I execute the script from Terminal?  I've tried typing python into the window and then dragging the file to terminal but I get a syntax error.  Sorry I am new to Python and just want to know how I can open such a file using 10.7.

Thanks

http://www.freeimagehosting.net/ilbqt
http://www.freeimagehosting.net/r5ars
On Monday, June 25, 2012 8:49:07 PM UTC+1, Benjamin Kaplan wrote:
> On Mon, Jun 25, 2012 at 11:19 AM, David Thomas <dthomas86 at me.com> wrote:
> > Hello,
> > This is my first post so go easy on me.  I am just beginning to program using Python on Mac.  When I try to execute a file using Python Launcher my code seems to cause an error in terminal, when I execute the exact same piece of code and run it in windows it seems to execute as exactly intended.
> >  How can I make my python script to open up correctly using Python Launcher?  I am running 10.7 on my Mac.  I would upload a photo with the error I get but I can't seem to find the upload feature in this group.
> >
> > Thanks
> > --
> 
> You can't find the upload feature because this isn't a Google Group.
> It's a Usenet newsgroup that Google Groups provides access to that's
> also available as a mailing list. If you want to provide an image, use
> an image host and link to the image.
> 
> As to your question, I have a few questions of my own. What version of
> Python are you using? Is it the version included in Mac OS X,
> installed from a python.org binary, compiled by source, or installed
> through a package manager? What happens if you call the script from
> the command line instead of using the Launcher application?




More information about the Python-list mailing list