[Tutor] 2 Different Development Invirments, IDLE & PythonWin 2 different results
Danny
wheelcrdan@hotmail.com
Wed Apr 2 15:23:01 2003
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01C2F91A.D4384A80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Everyone,
My question is I have downloaded IDLE and PythonWIn I have made this =
very simple program=20
password =3D 'foobar'
count =3D 0
while password !=3D 'Unicorn':
password =3D raw_input('password')
if count < 3:
count =3D count + 1
print count
elif count =3D=3D 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
------=_NextPart_000_0005_01C2F91A.D4384A80
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Everyone,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> My question is I =
have downloaded=20
IDLE and PythonWIn I have made this very simple program </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>password =3D 'foobar'<BR>count =3D =
0<BR>while password=20
!=3D 'Unicorn':<BR> password =3D=20
raw_input('password')<BR> if count <=20
3:<BR> count =3D count +=20
1<BR> print=20
count<BR> elif count =3D=3D=20
3:<BR> print 'man thats a hard =
one'<BR>print 'welcome in'<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>When I run this with IDLE, it works =
fine and exits=20
after 3 tries. But when you run the same program in PythonWin, it =
wont exit=20
until you get the password correctly why is this? Or what could I do=20
in PythonWin to make it exit after 3 tries? Thanks for everyone =
help ahead=20
of time.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Danny D</DIV></FONT></BODY></HTML>
------=_NextPart_000_0005_01C2F91A.D4384A80--