[Tutor] Issues In Terminal
Bill DeBroglie
bill.debroglie at gmail.com
Mon Sep 27 00:37:08 CEST 2010
On Sep 26, 2010, at 6:29 PM, Marc Tompkins wrote:
> On Sun, Sep 26, 2010 at 3:24 PM, Bill DeBroglie <bill.debroglie at gmail.com
> > wrote:
>
> Is this what you mean?
>
> matthew-parrillas-macbook:Dawson_Book matthewparrilla$ #!/usr/bin/
> env python
> matthew-parrillas-macbook:Dawson_Book matthewparrilla$ ./chapter_2.py
> ./chapter_2.py: line 1: syntax error near unexpected token `"Hello
> World"'
> ./chapter_2.py: line 1: `print("Hello World")'
>
> If so, obviously still no dice.
>
> No, I meant that you should edit your .py file and add
> #!/usr/bin/env python
> as the first line, THEN try to run it.
BINGO!
>
> Right now what's happening is that you're handing a line of Python
> script to the shell and asking it to run it; the shell is telling
> you (oh-so-politely) "what the hell is this?" You need to give it a
> clue.
Thank you for the translation. So I need to do this with every .py
file? My friend who was helping me (he's only been at this a few
months) doesn't need to do this. Is that possible or is he just
misleading me?
>
> --
> www.fsrtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100926/767bcba4/attachment-0001.html>
More information about the Tutor
mailing list