[Tutor] 2 Different Development Invirments, IDLE & PythonWin 2 different results

Reggie Dugard reggie@merfinllc.com
Wed Apr 2 15:39:04 2003


It's hard to believe you ran this EXACT same program under both IDE's
and they behaved differently.  In the listing you gave, there were no
'break' statements in the loop and you don't explicitly exit so it seems
to me that the only way to exit the loop is to type 'Unicorn'.

I don't understand why IDLE would exit after 3 tries.

Sorry I couldn't be of more help.
On Wed, 2003-04-02 at 12:21, Danny wrote:
> Hi Everyone,
>     My question is I have downloaded IDLE and PythonWIn I have made
> this very simple program 
> password = 'foobar'
> count = 0
> while password != 'Unicorn':
>     password = raw_input('password')
>     if count < 3:
>         count = count + 1
>         print count
>     elif count == 3:
>         print 'man thats a hard one'
> print 'welcome in'
> When I run this with IDLE, it works fine and exits after 3 tries. But
> when you run the same program in PythonWin, it wont exit until you get
> the password correctly why is this? Or what could I do in PythonWin to
> make it exit after 3 tries? Thanks for everyone help ahead of time.
> Danny D