Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Dave Angel
Marc Tompkins Wrote in message: > On Tue, Aug 5, 2014 at 8:23 AM, Zachary Ware > wrote: >> >> which it should be if the most recently >> installed Python was 3.3 or 3.4, installed with default options. >> > > And there we have my problem with this glorious new "feature". YOU > CAN'T RELY ON IT,

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Marc Tompkins
On Tue, Aug 5, 2014 at 8:23 AM, Zachary Ware wrote: > > which it should be if the most recently > installed Python was 3.3 or 3.4, installed with default options. > And there we have my problem with this glorious new "feature". YOU CAN'T RELY ON IT, because it depends on the most recent version

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Zachary Ware
On Tue, Aug 5, 2014 at 9:56 AM, Marc Tompkins wrote: > On Tue, Aug 5, 2014 at 12:48 AM, Maxime Steisel > wrote: >> 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. > > No. *ix operating systems

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Mark Lawrence
On 05/08/2014 15:56, Marc Tompkins wrote: On Tue, Aug 5, 2014 at 12:48 AM, Maxime Steisel wrote: 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. No. *ix operating systems (Unix, Linux, OS X, et

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Marc Tompkins
On Tue, Aug 5, 2014 at 12:48 AM, Maxime Steisel wrote: > 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. No. *ix operating systems (Unix, Linux, OS X, etc.) inspect the first line of a file to de

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Ben Finney
Greg Markham writes: > For cmd line, yes that's basically it. When I say "shell", I'm > referring to the Python IDLE GUI. For future reference: the operating system shell presents a command line. The Python shell presents a command line. So “shell” and “command line” don't distinguish between th

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Maxime Steisel
Le 2014-08-05 02:07, "Greg Markham" 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

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Greg Markham
On Mon, Aug 4, 2014 at 7:38 PM, Steven D'Aprano wrote: > On Mon, Aug 04, 2014 at 04:44:46PM -0700, Greg Markham wrote: > > > 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

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Greg Markham
On Mon, Aug 4, 2014 at 5:13 PM, Alan Gauld wrote: > On 05/08/14 00:21, Greg Markham wrote: > > but I'm running into a syntax error >> > > As others have said you are getting the expected error when running Python > v3 code under Python v2. > > How exactly are you running the program? It

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Steven D'Aprano
On Mon, Aug 04, 2014 at 04:44:46PM -0700, Greg Markham wrote: > 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"). I'm a little

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Alan Gauld
On 05/08/14 00:21, Greg Markham wrote: but I'm running into a syntax error As others have said you are getting the expected error when running Python v3 code under Python v2. How exactly are you running the program? It looks like somehow you are picking up Python v2 when you run the

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Greg Markham
On Mon, Aug 4, 2014 at 11:52 AM, Joel Goldstick wrote: > On Mon, Aug 4, 2014 at 1:28 PM, Greg Markham > wrote: > > Hello, > > > > I'm extremely new to Python having only just started learning this week. > > I'm slowly plodding through a book, Python Programming for the Absolute > > Beginner, 3rd

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Greg Markham
On Mon, Aug 4, 2014 at 12:37 PM, Alex Kleider wrote: > On 2014-08-04 10:28, Greg Markham wrote: > >> Hello, >> >> I'm extremely new to Python having only just started learning this week. >> I'm slowly plodding through a book, Python Programming for the Absolute >> Beginner, 3rd ed >>

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Cameron Simpson
On 04Aug2014 13:38, Danny Yoo wrote: > difference between the version of Python I'm using (3.4.1) and that which > was in use at the time the book was written (3.1.x) that is responsible > for this error. Just to double check: how are you confirming what version of Python you're using? In pa

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Danny Yoo
> > but I'm running into a syntax error when running one of the unmodified > > programs. On line 14, which reads: > > > > print("Here", end=" ") > > > > I'm receiving a syntax error which points to the end parameter. I'd like to also support Joel's suggestion to provide detailed output of the err

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Joel Goldstick
On Mon, Aug 4, 2014 at 1:28 PM, Greg Markham wrote: > Hello, > > I'm extremely new to Python having only just started learning this week. > I'm slowly plodding through a book, Python Programming for the Absolute > Beginner, 3rd ed by Michael Dawson. > > Code is provided for all the scripts found t

[Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Greg Markham
Hello, I'm extremely new to Python having only just started learning this week. I'm slowly plodding through a book, Python Programming for the Absolute Beginner, 3rd ed