[Tutor] The meaning of "raw_input"

guillaume willblake@wanadoo.fr
Fri May 30 13:30:02 2003


C'est un message de format MIME en plusieurs parties.

------=_NextPart_000_0000_01C326E2.42CE8140
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hello,
All is in the subject:)
I tried to run a prog I found in Cogliati's tutorial

print "Halt!"
s = raw_input("Who Goes there? ")
print "You may pass,", s

The output is:
Halt!
Who Goes there? Josh
You may pass,Josh

If I let raw_input like that, no Josh or anything else.
It's a variable,I think,but I don't understand her roll :-(
Contrarly at what he said, I didn't notice that "I had to type in
my name and then press Enter"
Unfortunately I'm not using IDLE (I'm downloading it), I'm working on W$ (at
home!)
Could u help me to understand clearly what is an input.
Thanks in advance :)

------=_NextPart_000_0000_01C326E2.42CE8140
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 5.50.4134.100" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003>Hello,</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN =
class=3D390302117-30052003>All=20
is in the subject:)</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN =
class=3D390302117-30052003>I=20
tried to run a prog I found in Cogliati's tutorial</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003>print "Halt!"</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN =
class=3D390302117-30052003>s =3D=20
raw_input("Who Goes there? ")</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003>print "You may pass,", s</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN =
class=3D390302117-30052003>The=20
output is:</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003>Halt!</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN =
class=3D390302117-30052003>Who=20
Goes there? Josh</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN =
class=3D390302117-30052003>You=20
may pass,Josh</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN =
class=3D390302117-30052003>If I=20
let raw_input like that, no Josh or anything else.</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN =
class=3D390302117-30052003>It's=20
a variable,I think,but I don't understand her roll =
:-(</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003>Contrarly at what he said,&nbsp;I didn't =
notice that "I=20
had to type in&nbsp;</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN =
class=3D390302117-30052003>my=20
name and then press Enter"</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003>Unfortunately I'm not using IDLE (I'm =
downloading it),=20
I'm working on W$ (at home!)</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003>Could u help me to understand clearly what is =
an=20
input.</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow" color=3D#0000ff><SPAN=20
class=3D390302117-30052003>Thanks&nbsp;in advance=20
:)</SPAN></FONT></DIV></BODY></HTML>

------=_NextPart_000_0000_01C326E2.42CE8140--