interrupting pythonD with ^C

J

John Savage

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.
 
S

Steve Holden

John said:
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
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top