classification
Title: raw_input() calls generate compile errors.
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.1
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, skip.montanaro, starz
Priority: normal Keywords:

Created on 2009-08-15 02:21 by starz, last changed 2009-08-15 02:53 by benjamin.peterson. This issue is now closed.

Files
File name Uploaded Description Edit
test3.py starz, 2009-08-15 02:21 source file
Messages (3)
msg91584 - (view) Author: (starz) Date: 2009-08-15 02:21
# ------ SOURCE -------
# cheerleading program
word = raw_input("Who do you go for? ")

for letter in word:
    call = "Gimme a " + letter + "!"
    print (call)
    print (letter) + "!"

print( "What does that spell?")
print( word + "!")

# ------- end source -------

## within python.help()
## --------------------
help> raw_input()
no Python documentation found for 'raw_input()'

help>

### --- run from O/S ---

C:\Program Files\OpenOffice.org 2.0\program\python3.1>python 
PYsource\test3.py
Traceback (most recent call last):
  File "PYsource\test3.py", line 22, in <module>
    word = raw_input("Who do you go for? ")
NameError: name 'raw_input' is not defined

C:\Program Files\OpenOffice.org 2.0\program\python3.1>
msg91589 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2009-08-15 02:52
Try it at the help> prompt without the parens (you're not calling
it here, just asking for the documentation on the name "raw_input".

help> raw_input

Help on built-in function raw_input in module __builtin__:

raw_input(...)
    raw_input([prompt]) -> string
    
    Read a string from standard input.  The trailing newline is stripped.
    If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise
EOFError.
    On Unix, GNU readline is used if enabled.  The prompt string, if given,
    is printed without a trailing newline before reading.
msg91590 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-08-15 02:53
raw_input() has been renamed to input() in Python 3.
History
Date User Action Args
2009-08-15 02:53:28benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg91590
2009-08-15 02:52:25skip.montanarosetstatus: open -> closed

nosy: + skip.montanaro
messages: + msg91589

resolution: not a bug
2009-08-15 02:21:09starzcreate