Mercurial > code > home > repos > light9
comparison bin/run_local.py @ 1239:0025b04a1c0a
tkinter not required
Ignore-this: b8538eaa508d2a41fbbc10782708e3a6
author | drewp@bigasterisk.com |
---|---|
date | Fri, 12 Jun 2015 10:01:24 +0000 |
parents | 3c78608a216a |
children | 8796803a1b45 |
comparison
equal
deleted
inserted
replaced
1238:cb300d230efd | 1239:0025b04a1c0a |
---|---|
5 import sys, os, socket | 5 import sys, os, socket |
6 sys.path.insert(0,os.path.join(os.path.dirname(sys.argv[0]),"..")) | 6 sys.path.insert(0,os.path.join(os.path.dirname(sys.argv[0]),"..")) |
7 | 7 |
8 from twisted.python.failure import Failure | 8 from twisted.python.failure import Failure |
9 | 9 |
10 import Tkinter | 10 try: |
11 def rce(self, exc, val, tb): | 11 import Tkinter |
12 sys.stderr.write("Exception in Tkinter callback\n") | 12 except ImportError: |
13 if True: | 13 pass |
14 sys.excepthook(exc, val, tb) | 14 else: |
15 else: | 15 def rce(self, exc, val, tb): |
16 Failure(val, exc, tb).printDetailedTraceback() | 16 sys.stderr.write("Exception in Tkinter callback\n") |
17 Tkinter.Tk.report_callback_exception = rce | 17 if True: |
18 sys.excepthook(exc, val, tb) | |
19 else: | |
20 Failure(val, exc, tb).printDetailedTraceback() | |
21 Tkinter.Tk.report_callback_exception = rce | |
18 | 22 |
19 import coloredlogs, logging, time | 23 import coloredlogs, logging, time |
20 try: | 24 try: |
21 import faulthandler | 25 import faulthandler |
22 faulthandler.enable() | 26 faulthandler.enable() |