473,383 Members | 1,853 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,383 software developers and data experts.

interrupting pythonD with ^C

I'm finding that many times when I inadvertently code an endless loop
in pythonD code, on MSDOS, execution cannot be interrupted by ctrl-C
and I am forced to reboot and this is rapidly loses its novelty.

Do users of pythonD have a coding technique, or a library file to include,
to endow a program with keyboard interrupt-ability?

Endless loops arise when I forget to increment a loop index, or code
incorrectly the end condition test, or indent wrongly, etc.
--
John Savage (my news address is not valid for email)

Mar 19 '06 #1
1 1306
John Savage wrote:
I'm finding that many times when I inadvertently code an endless loop
in pythonD code, on MSDOS, execution cannot be interrupted by ctrl-C
and I am forced to reboot and this is rapidly loses its novelty.

Do users of pythonD have a coding technique, or a library file to include,
to endow a program with keyboard interrupt-ability?

Endless loops arise when I forget to increment a loop index, or code
incorrectly the end condition test, or indent wrongly, etc.


Well, you could try programming more carefully :-)

Alternatively, try CTRL/Break. That seems to interrupt even when a
program is waiting on a network socket, which CTRL/C doesn't seem to.

Note, however, that this terminates the process without raising
KeyboardInterrupt.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd www.holdenweb.com
Love me, love my blog holdenweb.blogspot.com

Mar 19 '06 #2

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

Similar topics

2
by: J. W. McCall | last post by:
I'm working on a MUD server and I have a thread that gets keyboard input so that you can enter commands from the command line while it's in its main server loop. Everything works fine except that...
1
by: stephan | last post by:
Hi, Im am using PyRun_SimpleString() inside a BCB 5.0 GUI app on win32. All works fine. The PyRun_SimpleStript() runs a piece of python code which calls often a callback function to...
1
by: William | last post by:
For the following code snippet: for ( ;; ) { numFDInSet = select( fdmax+1, &readfds, NULL, NULL, &tv ); // ... signal( SIGALRM, alarm_handler ); // ...
4
by: Sam Sungshik Kong | last post by:
Hello! I have a form with 2 buttons. If you click button1, it runs a loop which changes the form's text from 0 to 99. I added Sleep(500) to make it slow. If you click button2 while the above...
5
by: kaburke | last post by:
My application is a simple create/update/delete system, with user authentication. Everything is working well, except session timeouts are creating user-experience nightmares. The standard...
3
by: John Savage | last post by:
I've very new to python, and am currently toying with pythonD. Could someone please explain the rationale behind python designers' thinking in deciding the function "range(1,12)" should return the...
8
by: andreas | last post by:
When I do a long calculation is there a possibility to interrupt this calculation properly? For i as integer = 1 to 100000000 do something next and retrieve the i at the moment of the...
3
by: caddit | last post by:
Hello. There has been some confusion as to the current version of the python programming language available for DOS. This is partially due to incorrect information kept on python.org, that...
2
by: John Simeon | last post by:
Hi there. I had an old computer at my disposal and decided to put it to use by setting up a nostalgia project with DOS and Windows for Workgroups 3.11. Now that all of you are back from laughing...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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 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.