[Tutor] Windows IDLE error msgs?

Alan Gauld alan.gauld at freenet.co.uk
Sat Nov 12 23:49:56 CET 2005

Are you sure you don't get an error? I get a dialog box that pops up
containing exactly the same error message you get from the console.

Alan G.

----- Original Message ----- 
From: "CPIM Ronin" <ronin_cpim at hotmail.com>
To: <alan.gauld at freenet.co.uk>
Sent: Saturday, November 12, 2005 9:00 PM
Subject: Re: [Tutor] Windows IDLE error msgs?

> Alan,
> I just typed in the following code in IDLE (runing under Windows XP):
> a = 1
> b = 2
> if (a == b)): print "ok"
> And then hit F5 to save and run. It very properly highlights the second 
> ")" before the colon, but does NOT give an accompanying error msg. In this 
> case, the error is deliberate and obvious--mismatched ")".
> Keying in the very same code using the command line:
>>>>a = 1
>>>>b = 2
>>>>if (a == b)): print "ok"
>  File "<stdin>", line 1
>    if (a == b)): print "ok"
>               ^
> SyntaxError: invalid syntax
> As you can see, I get an explicit "SyntacError: invalid syntax" error 
> message, when using command line, but not using IDLE. My question is, how 
> do I get IDLE to give me the same explicit error message as the command 
> line?
> Thanks.
> RC
>>From: "Alan Gauld" <alan.gauld at freenet.co.uk>
>>To: "CPIM Ronin" <ronin_cpim at hotmail.com>,<tutor at python.org>
>>CC: <ronin_CPIM at hotmail.com>
>>Subject: Re: [Tutor]  Windows IDLE error msgs?
>>Date: Sat, 12 Nov 2005 17:48:48 -0000
>>>syntax check and generates an execution error. However, if I have a 
>>>syntax error that's caught in the initial syntax checking phase, IDLE 
>>>merely goes to the particular line and highlights the line where the 
>>>error was detected.
>>Can you be more specific? Maybe include some short code that demonstrates
>>the symptom. I'm not sure I've seen that - but then I rarely use IDLE 
>>Alan G.
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE! 
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

More information about the Tutor mailing list