More problems....

Tim Peters tim_one at email.msn.com
Tue Jan 18 23:28:32 EST 2000


[posted & mailed]
[Guido, is this a known bug?  Not in the bugs list, but it's
 become a frequent complaint.]

[TechSpood]
> ...
> I will write a simple program (in the IDLE enviroment) then
> when I run it, it will run it til it gets to the first input
> statement, at which time it will stop reading the program.
> I don't get a syntax error or any other kind of error.
> ...

Let's track this down.  For starters, I'm assuming you also *run* (as well
as write) the program within IDLE.  Scream if that's wrong.

You haven't said which version of Python you're using (I assume 1.5.2),
which OS (since your post identified itself as coming from Outlook Express,
I assume some flavor of Windows), or given a minimal failing example.  So
there's little to go on.  I don't have any problem running this code under
Win95 under IDLE:

for i in range(3):
    pw = raw_input(("Please enter your password: ",
                    "Try again: ",
                    "Last chance, pal: ")[i])
    print "mumble, mumble, ... hey!", pw, "is no good!"
print "Go away."

Do you?  Here's a sample session pasted from my IDLE:

Python 1.5.2 (#0, Apr 13 1999, 10:51:12)
[MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
IDLE 0.5 -- press F1 for help
>>>
Please enter your password: xyz
mumble, mumble, ... hey! xyz is no good!
Try again: try what again?
mumble, mumble, ... hey! try what again? is no good!
Last chance, pal: same to you!
mumble, mumble, ... hey! same to you! is no good!
Go away.

Assuming that doesn't work for you, there's one obvious (to me <wink>)
difference in what I'm doing:  I'm running the latest version of IDLE, not
the one that shipped with 1.5.2.

If you want to try that, get it from the CVS archive at python.org, or, if
you're not set up for CVS, David Ascher kindly maintains a current snapshot
at

http://starship.python.net:9673/crew/da/

info-is-more-useful-than-frustration<wink>-ly y'rs  - tim






More information about the Python-list mailing list