473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

unbuffered input

Hi,
I have a numbered menu that I want users to from. They choose the
number corresponding to the action they wish to take.
Right now I'm using input() to get the user's responce. They press the
number then press ENTER. I would like to skip the
part where they press ENTER, so that the user presses the number and
then they get the action they chose without having
to press ENTER. Is there a way to do this and how?

thank you for you time,
Michael Young

Jul 18 '05 #1
1 1473
> I have a numbered menu that I want users to from. They choose the
number corresponding to the action they wish to take.
Right now I'm using input() to get the user's responce. They press the
number then press ENTER. I would like to skip the
part where they press ENTER, so that the user presses the number and
then they get the action they chose without having
to press ENTER. Is there a way to do this and how?


Look into the curses module and its raw-mode.

Regards,

Diez B. Roggisch
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Max Rabkin | last post by:
While java's System.in is, according to the javadocs, an InputStream, it is in fact an instance of java.io.BufferedInputStream. Is there any way to have unbuffered access to it without hacking the...
5
by: Rich | last post by:
Does anyone know the correct way of opening an unbuffered output file using STL? I attempted: ofstream myfile("fname.txt", ios::binary); myfile.setbuf(NULL, 0); and I was informed that...
1
by: | last post by:
Is this even possible? I've found some references to specific "unbuffered" type methods that exist in older incarnations of basic_streambuf but not in newer ones. Info please. :P
11
by: Lonnie Princehouse | last post by:
>From the cmd shell on both Windows 2k and XP, I'm getting this weird syntax error in conjunction with the unbuffered flag. It works fine without -u. Has anyone else encountered it? This didn't...
4
by: pank7 | last post by:
hi everyone, I have a program here to test the file IO(actually output) with buffer turned on and off. What I want to see is that there will be obvious differece in time. Here I have an input...
7
by: Markus Mayer | last post by:
Hi folks. I'm somewhat new to *nix programming and just ran into a problem. I have to take user input from the terminal but like to constrain that to some rules given, i.e. "numbers only" or...
4
by: yomama | last post by:
I am looking to take unbuffered, unechoed input from the user. The idea is to print "Press any key to continue" and allow the user to do just that, without having to press enter, and without having...
1
by: Yang Zhang | last post by:
Hi, is there any way to get unbuffered stdout/stderr without relying on the -u flag to python or calling .flush() on each print (including indirect hacks like replacing sys.stdout with a wrapper...
4
by: Jules | last post by:
I am trying to understand the behavior of a short program. Hopefully someone can tell me what's going on. The program I wrote is: #include <stdio.h> main() { char c; while(1)
8
by: zeeshan708 | last post by:
what is the difference between the buffered and unbuffered stream ??(e.g we say that cout is buffered and cerr is unbuffered stream) does that mean that the output sent to buffered stream have to go...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.