Mercurial > code > home > repos > light9
comparison bin/keyboardcomposer @ 278:d20fda03a041
LevelServer in keyboardcomposer fails less gracelessly
author | David McClosky <dmcc@bigasterisk.com> |
---|---|
date | Fri, 17 Jun 2005 18:23:53 +0000 |
parents | c7bba03ddc36 |
children | 2848cf5e14c5 |
comparison
equal
deleted
inserted
replaced
277:e7630a2072bd | 278:d20fda03a041 |
---|---|
265 tl = toplevelat("Keyboard Composer", existingtoplevel=root) | 265 tl = toplevelat("Keyboard Composer", existingtoplevel=root) |
266 | 266 |
267 kc = KeyboardComposer(tl, s) | 267 kc = KeyboardComposer(tl, s) |
268 kc.pack(fill=BOTH, expand=1) | 268 kc.pack(fill=BOTH, expand=1) |
269 | 269 |
270 ls = LevelServer(kc.name_to_subtk) | 270 import twisted.internet |
271 reactor.listenTCP(networking.kcPort(), server.Site(ls)) | 271 try: |
272 ls = LevelServer(kc.name_to_subtk) | |
273 reactor.listenTCP(networking.kcPort(), server.Site(ls)) | |
274 except twisted.internet.error.CannotListenError, e: | |
275 print "Can't (and won't!) start level server:" | |
276 print e | |
272 | 277 |
273 root.protocol('WM_DELETE_WINDOW', reactor.stop) | 278 root.protocol('WM_DELETE_WINDOW', reactor.stop) |
274 reactor.addSystemEventTrigger('after', 'shutdown', kc.save) | 279 reactor.addSystemEventTrigger('after', 'shutdown', kc.save) |
275 | 280 |
276 tksupport.install(root,ms=10) | 281 tksupport.install(root,ms=10) |