Executing Python Scripts on Mac using Python Launcher
David Thomas
dthomas86 at me.com
Tue Jun 26 14:09:54 EDT 2012
On Tuesday, June 26, 2012 6:37:42 PM UTC+1, Dave Angel wrote:
> On 06/26/2012 01:19 PM, David Thomas wrote:
> > 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
>
> Assuming python is on your PATH within that terminal, you'd normally do
> something like:
>
> cd /fullpathtoscript (the location of your script)
> python myscript.py (or whatever your script is called)
>
>
> If that doesn't work for you, please be specific about what happens.
> Best way to do that is to copy/paste the text (showing in terminal)
> into your reply here.
>
> Also, please don't top-post. Put your new text AFTER the part you've
> quoted from earlier messages.
>
> --
>
> DaveA
On Tuesday, June 26, 2012 6:37:42 PM UTC+1, Dave Angel wrote:
> On 06/26/2012 01:19 PM, David Thomas wrote:
> > 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
>
> Assuming python is on your PATH within that terminal, you'd normally do
> something like:
>
> cd /fullpathtoscript (the location of your script)
> python myscript.py (or whatever your script is called)
>
>
> If that doesn't work for you, please be specific about what happens.
> Best way to do that is to copy/paste the text (showing in terminal)
> into your reply here.
>
> Also, please don't top-post. Put your new text AFTER the part you've
> quoted from earlier messages.
>
> --
>
> DaveA
On Tuesday, June 26, 2012 6:37:42 PM UTC+1, Dave Angel wrote:
> On 06/26/2012 01:19 PM, David Thomas wrote:
> > 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
>
> Assuming python is on your PATH within that terminal, you'd normally do
> something like:
>
> cd /fullpathtoscript (the location of your script)
> python myscript.py (or whatever your script is called)
>
>
> If that doesn't work for you, please be specific about what happens.
> Best way to do that is to copy/paste the text (showing in terminal)
> into your reply here.
>
> Also, please don't top-post. Put your new text AFTER the part you've
> quoted from earlier messages.
>
> --
>
> DaveA
On Tuesday, June 26, 2012 6:37:42 PM UTC+1, Dave Angel wrote:
> On 06/26/2012 01:19 PM, David Thomas wrote:
> > 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
>
> Assuming python is on your PATH within that terminal, you'd normally do
> something like:
>
> cd /fullpathtoscript (the location of your script)
> python myscript.py (or whatever your script is called)
>
>
> If that doesn't work for you, please be specific about what happens.
> Best way to do that is to copy/paste the text (showing in terminal)
> into your reply here.
>
> Also, please don't top-post. Put your new text AFTER the part you've
> quoted from earlier messages.
>
> --
>
> DaveA
Hi
On Tuesday, June 26, 2012 6:37:42 PM UTC+1, Dave Angel wrote:
> On 06/26/2012 01:19 PM, David Thomas wrote:
> > 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
>
> Assuming python is on your PATH within that terminal, you'd normally do
> something like:
>
> cd /fullpathtoscript (the location of your script)
> python myscript.py (or whatever your script is called)
>
>
> If that doesn't work for you, please be specific about what happens.
> Best way to do that is to copy/paste the text (showing in terminal)
> into your reply here.
>
> Also, please don't top-post. Put your new text AFTER the part you've
> quoted from earlier messages.
>
> --
>
> DaveA
On Tuesday, June 26, 2012 6:37:42 PM UTC+1, Dave Angel wrote:
> On 06/26/2012 01:19 PM, David Thomas wrote:
> > 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
>
> Assuming python is on your PATH within that terminal, you'd normally do
> something like:
>
> cd /fullpathtoscript (the location of your script)
> python myscript.py (or whatever your script is called)
>
>
> If that doesn't work for you, please be specific about what happens.
> Best way to do that is to copy/paste the text (showing in terminal)
> into your reply here.
>
> Also, please don't top-post. Put your new text AFTER the part you've
> quoted from earlier messages.
>
> --
>
> DaveA
On Tuesday, June 26, 2012 6:37:42 PM UTC+1, Dave Angel wrote:
> On 06/26/2012 01:19 PM, David Thomas wrote:
> > 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
>
> Assuming python is on your PATH within that terminal, you'd normally do
> something like:
>
> cd /fullpathtoscript (the location of your script)
> python myscript.py (or whatever your script is called)
>
>
> If that doesn't work for you, please be specific about what happens.
> Best way to do that is to copy/paste the text (showing in terminal)
> into your reply here.
>
> Also, please don't top-post. Put your new text AFTER the part you've
> quoted from earlier messages.
>
> --
>
> DaveA
More information about the Python-list
mailing list