I'm a newbie and you helped me find the answer...

Dwight Hotmail GoldWinde at hotmail.com
Mon Aug 3 12:30:30 CEST 2015


Thank you, Jussi.

Problem finally solved.

I am using Coderunner 2 as my editor. It has a language setting. I had set
it as Python instead of Python 3.

Duh!

Thank you again, everyone!


With appreciation,

Dwight

Dwight at GoldWinde.com
www.goldwinde.com

Author of the book, "Courage: the Choice that Makes the Difference--Your
Key to a Thousand Doors"

You can find all my books at http://www.couragebooks.key.to/
    
1-206-923-9554 (USA Telephone)
1-206-350-0129 (voice mail and fax U.S.A.)
86-153-9867-5712 (China Telephone)
goldwindedwight (Skype)
goldwinde (Wechat)
+8615398675712 (Whatsapp)
www.3forliving.key.to (daily living video playlist)
http://www.couragebooks.key.to/ (my books)



On 8/3/15, 5:49 PM, "Jussi Piitulainen" <jpiitula at ling.helsinki.fi> wrote:

>Dwight GoldWinde quotes himself:
>>
>>> Okay, thank you, Dave, so I got the following info: type $(which
>>> python3)
>>> /Library/Frameworks/Python.framework/Versions/3.4/bin/python3 is
>>> /Library/Frameworks/Python.framework/Versions/3.4/bin/python3
>>>
>>> But I can¹t figure out what short of ³usr² statement
>>> (e.g. #!/usr/bin/env python3) I need to point it there. Whatever I
>>> tried, still gives me version 2.
>
>How are you launching your script? If your method involves clicking some
>pretty picture or something similar, you may be bypassing /usr/bin/env
>altogether and relying on some association of file types in Mac OS. Then
>you need to investigate file properties in Finder, or something like
>that. It should be safe to change the association for that individual
>script but not necessarily for all files with the same extension.
>
>If your method is to type "python scriptname" at the shell prompt, you
>are definitely bypassing /usr/bin/env and specifying the default python
>as the one to use. Solution: type "python3 scriptname" instead. (A more
>advanced solution: make scriptname executable and type "./scriptname"
>instead. This one uses /usr/bin/env to find the interpreter.)
>
>(You could try "#!/usr/bin/env aintgotnosuch" as your script's hashbang
>line to see if it even matters what that line says. Check first that you
>don't happen to have a program named "aintgotnosuch" in your path.)
>-- 
>https://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list