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-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 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

[Tutor] Installing Python 2.5.4 on Windows 8 Questions

2014-08-05 Thread Kelvin Baumgart
My current OS is Windows 8 unfortunately. I'm definitely desiring to change this however for the time being I require an external DVD burner to obtain backups/OS before I can really progress. For the time being I'm recently someone who has an unparalleled drive towards becoming a programmer. I'd im

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] Installing Python 2.5.4 on Windows 8 Questions

2014-08-05 Thread Alan Gauld
On 05/08/14 05:02, Kelvin Baumgart wrote: My current OS is Windows 8 unfortunately. The Windows 8 GUI sucks, but other than that its not a bad OS IMHO... And Classic Shell fixes the UI. and Programming" which is being taught through MIT. Their curriculum is centered on 2.5.4 however any 2.5 o

Re: [Tutor] Installing Python 2.5.4 on Windows 8 Questions

2014-08-05 Thread Steven D'Aprano
Hi Kelvin, My responses interleaved between your comments below. On Mon, Aug 04, 2014 at 11:02:05PM -0500, Kelvin Baumgart wrote: > My current OS is Windows 8 unfortunately. I'm definitely desiring to change > this however for the time being I require an external DVD burner to obtain > backups/OS

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 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 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 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 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,

[Tutor] Specifying the selected object number in Blender

2014-08-05 Thread Marcus Mravik
I am trying to specify a number based on what the selected object number in the scene is. import bpy for obj in bpy.context.selected_objects: bpy.context.scene.objects.active = obj bpy.ops.graph.sound_bake(filepath="C:\\Users\\Marcus\\Music\\Don't Just Stand There (Instrumental).mp3", l

Re: [Tutor] Specifying the selected object number in Blender

2014-08-05 Thread Alan Gauld
On 05/08/14 18:35, Marcus Mravik wrote: My overall goal is to create a Music Visualizer with Blender and I am trying to automate the selection of the object, applying the variable that goes up by 50 each time, starting with 0 for the low freq and 50 for the high freq. And ending with 7950 low an

Re: [Tutor] Specifying the selected object number in Blender

2014-08-05 Thread Peter Otten
Marcus Mravik wrote: > I am trying to specify a number based on what the selected object number > in the scene is. > > import bpy > > for obj in bpy.context.selected_objects: > > bpy.context.scene.objects.active = obj > > bpy.ops.graph.sound_bake(filepath="C:\\Users\\Marcus\\Music\\Don

Re: [Tutor] Specifying the selected object number in Blender

2014-08-05 Thread Steven D'Aprano
On Tue, Aug 05, 2014 at 12:35:57PM -0500, Marcus Mravik wrote: > I am trying to specify a number based on what the selected object number in > the scene is. Well, I have no idea about Blender, but if "selected object number" is just an int, starting from 0 (or perhaps 1) and incrementing by 1 eac