Jeanne
Posts: 2
Joined: Thu May 29, 2014 2:49 pm

syntax error in supplied IDLE script

Thu May 29, 2014 3:09 pm

Just started on Python and failed on the first Hello World script with a syntax error in line 1 of the supplied IDLE3 script (same with IDLE also).
Reports: syntax error near unexpected token '('
'Python 3.2.3 (default, Mar 1 2013, 11:53:50) '

Not sure why this is happening. Do I need to download new version of IDLE? or Python? or can I edit the script, in which case to be what? I have carried on by using Leafpad, but would prefer to have the functionality of IDLE.

I am running Debian on a Pi purchased a year ago - slow starter I know, but Scratch was fun.

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: syntax error in supplied IDLE script

Thu May 29, 2014 3:50 pm

Please point out the tutorial you are following - the error is occurring on text that does not look like part of a python script. This is almost certainly due to confusion between the idle python shell window - where you can use python statements interactively - and an idle 'new file' window which is where you would load or type complete python scripts.
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Jeanne
Posts: 2
Joined: Thu May 29, 2014 2:49 pm

Re: syntax error in supplied IDLE script

Thu May 29, 2014 4:23 pm

Thank you.

As you say, I got myself confused by not reading the user guide properly. On P153 it shows the Python shell window in IDLE and I omitted to read the following words which told you to open a new blank window. Doh.

Lesson learned :oops:

Return to “Python”