interrupting pythonD with ^C

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Savage

    #1

    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)

  • Steve Holden

    #2
    Re: interrupting pythonD with ^C

    John Savage wrote:[color=blue]
    > 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.[/color]

    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
    KeyboardInterru pt.

    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.blogs pot.com

    Comment

    Working...