Reading user input
Ulf Engstrøm
ulf.engstrom at b2b-link.com
Fri Apr 28 07:54:39 EDT 2000
I guess what you're looking for is raw_input(). Works like this:
>>> text = raw_input('Enter text here->')
Enter text here->Anything I want
>>> text
'Anything I want'
Hope it helps :)
Regards
Ulf
> Hi.
>
> I'm doing some studing about python and MySQL. I've done little test
> program where I use database from python. Now I need get user input to
> do some queries(and other stuff) to database. I've read Python manual
> but haven't found simple solution to do that. I can read something
> using curses but I don't like it. Is there other(and simpler) way to
> do that??
>
> I've done only CGI programs with python and there haven't been any
> need to read chars from user input. Only stuff from stdin that httpd
> have put there.
>
> At this case 'user input' is not arguments given when program starts
> but variables that are given when program is running.
>
> Of course I could do html-page and do my test program as CGI and use
> it that way but it's too much trouble when I'm only trying to learn
> databases and how to use them from python.
>
> TK
> --
> http://www.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list