470,561 Members | 1,983 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,561 developers. It's quick & easy.

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 1224
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by J. W. McCall | last post: by
1 post views Thread by stephan | last post: by
1 post views Thread by William | last post: by
4 posts views Thread by Sam Sungshik Kong | last post: by
5 posts views Thread by kaburke | last post: by
3 posts views Thread by John Savage | last post: by
8 posts views Thread by andreas | last post: by
3 posts views Thread by caddit | last post: by
2 posts views Thread by John Simeon | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.