[Tutor] Issues In Terminal
David Hutto
smokefloat at gmail.com
Mon Sep 27 00:04:59 CEST 2010
On Sun, Sep 26, 2010 at 6:03 PM, David Hutto <smokefloat at gmail.com> wrote:
> On Sun, Sep 26, 2010 at 5:55 PM, Bill DeBroglie
> <bill.debroglie at gmail.com> wrote:
>> Hello all,
>>
>> Totally new to this stuff and community so I very much appreciate the help
>> and apologize in advance for asking what might be a stupid question... Oh,
>> and I'm new to the lingo too!!
>>
>> I'm having issues running Python in Terminal. When I run code through the
>> interpreter I get:
>>
>> Python 2.6.5 (r236:73959, Mar 24 2010, 01:32:55)
>> [GCC 4.0.1 (Apple Inc. build 5943)] on darwin
>> Type "help", "copyright", "credits" or "license" for more
>> information.
>> >>> print("Hello World")
>> Hello World
>>
>> Which is great, but when I try and run the same code in the Terminal by
>> calling a program I've written (print("hello world") again) I get the
>> following:
>>
>> matthews-macbook:Dawson_Book matthewparrilla$ ./chapter_2.py
>> ./chapter_2.py: line 4: syntax error near unexpected token `"Hello
>> World"'
>> ./chapter_2.py: line 4: `print("Hello World")'
>
> Pretty sure it's the parentheses, but I'm not an expert. In python 3 you use
> print(), in 2.6 you either use import from __futur__ or print "string here".
I mean __future__ .
>
>>
>> I'm using a Mac OS X 10.5.8. I had previously downloaded Python 2.6.5 AND
>> 3.1 and had them both on this computer simultaneously but was having trouble
>> with 3.1 crashing. I have since put both in the trash but obviously still
>> have 2.6.5 on my system, I assume that was the version pre-installed on this
>> Mac.
>>
>> Any guidance at all would be much appreciated-- I'm totally lost and have
>> spent hours trying to figure this out.
>>
>> bdb
>> _______________________________________________
>> Tutor maillist - Tutor at python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>
More information about the Tutor
mailing list