Bugs in IDLE environment (??)

Siggy Brentrup bsb at winnegan.de
Mon Jan 17 03:38:52 EST 2000


"Giovanni Riccardi" <composzioni at tiscalinet.it> writes:

> Just a repost of the message, because I had no
> replies within a week.

Mayby you didn't get an answer because you didn't give us enough
information on your environment and didn't even describe the
error you encountered ?

> ------
> I wrote a small script that uses input() to get
> the user input,get the values, make some calculation
> and return calculated value.

> The problem is that it works when the script is executed directly by the
> interpreter, ...

I doubt it does.

> ... but not in IDLE environment where after the user has entered
> some values the script doesn't return to the main loop.
> For example:
> 
> print "Enter the name:"
> x = input("--> ")

Here's what I get when pasting your commands into IDLE's shell:

Python 1.5.2+ (#4, Nov 18 1999, 01:39:08)  [GCC egcs-2.91.66 19990314 (egcs-1.1.2 release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
IDLE 0.5 -- press F1 for help
>>> print "Enter the name:"
Enter the name:
>>> x = input("--> ")
--> Siggy
Traceback (innermost last):
  File "<pyshell#1>", line 1, in ?
    x = input("--> ")
  File "<string>", line 0, in ?
NameError: Siggy
>>> 

[...]

> doesn't continue after the first input().

Sure, it raises an exception :)

> Some help??

Look into the "Builtin Functions" section of the library reference for
input vs. raw_input and work through the Tutorial.

> thanx in advance
> Giovanni

HIH
  Siggy

-- 
Siggy Brentrup - bsb at winnegan.de - http://www.winnegan.de/
                  bsb at north.de - http://www.north.de/~bsb/
****** ceterum censeo javascriptum esse restrictam *******




More information about the Python-list mailing list