"rick" <rdo...@cogeco.ca> wrote
Somehow you are picking up an older v2 interpreter.
How are you running the script?

Could geany be calling the 2.6 interpreter, even with v3 in the first
line?  oh my, that is unexpected, just tried it.

#!/usr/bin/python3
import sys
print(sys.version)

from geany yields:
2.6.4 (r264:75706, Dec 7 2009, 18:43:55)


Very few IDEs (none that I know of!) honour the shebang line, that is usually only applicable to the shell.

You need to change the interpreter setup from within the IDE to change interpreter.

Another reason you should *always* test your scripts from the OS level before assuming they work, rather than relying
on the IDE.

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to