Hi Group,
I have been absent a while, mainly because I have been getting better at
figuring out my own Python problems. But not this one...
I have a timed loop performing certain tasks until a total period of
time has elapsed. I would like to be able to interrupt the loop or set
various flags during execution via keyboard input. raw_input seems to
just stop everything cold. I want the ability to just sacn the keyboard
buffer and see if something is there, then proceed normally in the loop
if there is no input in the buffer. Make sense? Totally easy? Let me
know...
wave_man 2 2777
John Fisher wrote:
Hi Group,
Hi John
I have been absent a while, mainly because I have been getting better at
figuring out my own Python problems. But not this one...
I have a timed loop performing certain tasks until a total period of
time has elapsed. I would like to be able to interrupt the loop or set
various flags during execution via keyboard input. raw_input seems to
just stop everything cold. I want the ability to just sacn the keyboard
buffer and see if something is there, then proceed normally in the loop
if there is no input in the buffer. Make sense? Totally easy? Let me
know...
If you are on a UNIX platform, you can use the curses module. http://docs.python.org/lib/module-curses.html
There is a link there to a tutorial, but it seems to be broken. A
quick search finds it there: http://www.amk.ca/python/howto/curses/
HTH
--
Arnaud
Arnaud Delobelle <ar*****@googlemail.comwrote:
John Fisher wrote:
Hi Group,
Hi John
I have been absent a while, mainly because I have been getting better at
figuring out my own Python problems. But not this one...
I have a timed loop performing certain tasks until a total period of
time has elapsed. I would like to be able to interrupt the loop or set
various flags during execution via keyboard input. raw_input seems to
just stop everything cold. I want the ability to just sacn the keyboard
buffer and see if something is there, then proceed normally in the loop
if there is no input in the buffer. Make sense? Totally easy? Let me
know...
If you are on a UNIX platform, you can use the curses module.
http://docs.python.org/lib/module-curses.html
There is a link there to a tutorial, but it seems to be broken. A
quick search finds it there:
http://www.amk.ca/python/howto/curses/
HTH
--
Arnaud
Thanks for your reply Arnaud. I am using an Intel mac, running Leopard
10.5.2, so that's Posix I warrant. I will check this out.
JF This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jane Austine |
last post by:
As far as I know python's threading module models after Java's.
However, I can't find something equivalent to Java's interrupt and
isInterrupted methods, along with InterruptedException....
|
by: Jon Skeet [C# MVP] |
last post by:
Please excuse the cross-post - I'm pretty sure I've had interest in the
article on all the groups this is posted to.
I've finally managed to finish my article on multi-threading - at least
for...
|
by: Mairhtin O'Feannag |
last post by:
Hello,
We have two machines we wish to use DPF. They are both RH ES 2.1, with
DB2 8.2.
I read the documentation CAREFULLY, and added the following line to my
db2nodes.cfg file :
1 egret 0
|
by: markryde |
last post by:
Hello,
I saw in some open source projects a use of "!!" in "C" code;
for example:
in some header file
#define event_pending(v) \
(!!(v)->vcpu_info->evtchn_upcall_pending & \...
|
by: giginjose |
last post by:
I am getting the following message when I try to port my OS image into a PXA 255 board.
"4294773077 PID:83c76026 TID:83c76002 Other Interrupt "
The message comes in the Debug window and it just...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
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,...
|
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...
| |