"Steve Holden" <[EMAIL PROTECTED]> wrote:
8<---
> >>> mystr = raw_input("Who is this? ")
> Who is this? Steve
how did you know how to answer that?
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
> Or use raw_input(), which was designed for such situations:
>
thx, did not know about that ...
--
http://mail.python.org/mailman/listinfo/python-list
Sybren Stuvel wrote:
> alf enlightened us with:
>
>>I have a command line program which also does some interaction with the
>>user using stdin and stdout.
>>
>>My requirement is to print prompt so the user can answer in the same
>>line. Unfortunately:
>>
>> print 'enter command:',
>>
>>
>>does
Sybren Stuvel:
> def prompt(label):
> '''Prompts the user, returning the typed text'''
> sys.stdout.write(label)
> return sys.stdin.readline()
Maybe raw_input function may help too.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
alf enlightened us with:
> I have a command line program which also does some interaction with the
> user using stdin and stdout.
>
> My requirement is to print prompt so the user can answer in the same
> line. Unfortunately:
>
> print 'enter command:',
>
>
> does not really work as the comma i
Hi,
I have a command line program which also does some interaction with the
user using stdin and stdout.
My requirement is to print prompt so the user can answer in the same
line. Unfortunately:
print 'enter command:',
does not really work as the comma is carried over to the following line