[Idle-dev] Interruptable code?
Douglas S. Blank
dblank at brynmawr.edu
Sat Dec 16 05:32:51 CET 2006
I notice that in IDLE when running with -n (no processes) that:
>>> while 1: 1
can be stopped with control+c, but:
>>> while 1: None
cannot. I realize that this is true because the second example doesn't
cause anything to be written in the IDLE window, and the first does.
I see that running without the additional subprocess might make this a
hard bug to fix. But, is there something I can call like so:
>>> while 1: func()
where:
def func():
# a call to check for control+c or update IDLE
return None
Some additional data:
- I can't use idle with sub processes (because I want to interact with
Tkinter in a single thread)
- I tried printing nothing to the window:
>>> while 1: print '',
(note comma) but that actually does print something to the window. Can I
make these processes interruptable without printing something to the
window? I'm willing to alter IDLE if necessary.
Thanks for any hints,
-Doug
--
Douglas S. Blank
Associate Professor, Bryn Mawr College
http://cs.brynmawr.edu/~dblank/
Office: 610 526 601
More information about the IDLE-dev
mailing list