Hi group,
I learned some python quite a while ago and have decided to revisit it as a tool for statistical analysis.
I installed Python(x, y) on my work machine last week (Windows XP) and, after some playing around it looks like things are working (am able to run example scripts from Allen Downey's free book ThinkPython in Spyder).
At home I run an old MacBook (OSX 10.6.8) so I have installed the Anaconda distribution. Once again, it looked like everything was working correctly.
So, I copied all the examples files and pdf of ThinkPython to a USB key so that whether I'm at home, at work or on the train, I can work through the example and get myself back up to speed with python.
When I tried to run write/run 'hello world' this morning on the train (OSX) I got the following error:
File "<stdin>", line 1
SyntaxError: 'continue' not properly in loop
I got to work, loaded up Spyder and tried to run the same HelloWorld.py and got the same error. I also tried running some of the other scripts I was playing with last week and got the same error even those these scripts had previously run.
I still have PyScripter on my work machine, so ran HelloWorld.py using PyScripter and got Hello world at the console.
If I run debug on HelloWorld.py from Spyder I get:
>>> debugfile(r'E:\Programming\Python\ThinkPython\HelloWorld.py', wdir=r'E:\Programming\Python\ThinkPython')
> e:\programming\python\thinkpython\helloworld.py(5)<module>()
-> """
(Pdb)
(with a flashing command prompt after (Pdb))
If I then run HelloWorld.py I get:
(Pdb) continue
Hello world
>>>
But subsequent runs give the initial error.
I'm assuming this is related to Spyder, as I can run the same scripts in PyScipter without error.
Hope someone can help (apologies in advance if this is a newbie error).