[Tutor] interactive questions

Alan Gauld alan.gauld at btinternet.com
Sat Dec 26 17:11:02 CET 2009


"rick" <rdole1 at 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.



More information about the Tutor mailing list