Le 2014-08-05 02:07, "Greg Markham" <greg.mark...@gmail.com> a écrit:
>  Ok, when I try this from the Shell window, it works.  When executing the
full program from command line, it does not.  Python versions from both
shell and command line are 3.4.1 (confirmed via command: "python -V").
>
> Full error msg output when run from cmd line reads:
>
>   File "I:\Programming\Scripts\Learning\chapter02\game_over2.py", line 14
>
>     print("Here", end=" ")
>                      ^
> SyntaxError: invalid syntax
>

That definitely show that python2 is running.

I think this is because on windows, *.py files are associated with py.exe
that choose the python version depending on the first line of your file.
Putting #!python3 on the first line of game_over2.py should solve it.

See PEP 397 [1] for more details about this feature.

[1] http://legacy.python.org/dev/peps/pep-0397/
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to