Keyboard interrupts, Idle vs. SciTE
John Ladasky
ladasky at my-deja.com
Thu Nov 2 16:55:04 EST 2006
Hi there.
The following minimal code in Python 2.3.4 works under Idle v. 1.0.3,
but not under SciTE v. 1.66:
from time import sleep
try:
while True:
sleep(0.25)
print ".",
except KeyboardInterrupt:
print "\nKeyboard interrupt received. Exiting program.\n\n"
Under SciTE, I do not get my "exiting program" message. Instead, I get
the standard SciTE abort message:
>Process failed to respond; forcing abrupt termination...
>Exit code: 1
I much prefer the SciTE environment to Idle. Is there any way that I
can rewrite my program to restore the keyboard interrupt function under
SciTE? Alternately, is there some setting that I can change in SciTE
to accomplish the same effect?
Thanks for your input!
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Ladasky Home Solar, Inc.: blowing sunshine up your |
| power grid since March 24, 2005. Fiat lux! |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Uptime Downtime kWh generated kWh consumed |
| 584 days 6.5 hours 10953 10982 |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
More information about the Python-list
mailing list