input() or raw_input() in Console module.

A

alex23

I'm using Console module (doc:http://effbot.org/zone/console-handbook.htm,
like nCurses) on Windows, but I don't know how to call a keyboard
input like input() or raw_input().
What to do?

Maybe read the docs, specifically the section titled "Input":

get() => event
Get the first event from the input queue. The return value is an
instance of the Event class. If the input queue is empty, this method
blocks.

getchar() => event
Get the first character event from the input queue, ignoring any other
kind of event. The return value is an instance of the KeyPress class.
If the input queue is empty, this method blocks.

If you've tried playing with these without success, at least post code
showing what you've tried, it makes it easier in providing a suitable
response.
 
D

Dennis Lee Bieber

I'm using Console module (doc: http://effbot.org/zone/console-handbook.htm,
like nCurses) on Windows, but I don't know how to call a keyboard
input like input() or raw_input().
What to do?

If you mean just a single call that retrieves a "line" of input...
Based upon the documentation -- IT DOESN'T EXIST.

You have to use the various GET/PEEK calls to obtain input events,
filter for keys, and combine the keys into input (that is, accumulate
until some line-end indicator is reached -- which could be a tab if you
are using an input form and want to move from field to field).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top