1
1
import os
2
2
import math
3
- from wrappers import *
4
- from widget import *
5
- import glob
6
- import subprocess
7
- import animated_property
8
- if sys .platform == 'win32' :
9
- import _winreg
10
3
11
-
12
- import CommandBar
13
4
from talkshowLogger import logger
14
-
15
5
debug = logger .debug
16
6
info = logger .info
17
7
warn = logger .warn
18
8
9
+ try :
10
+ import CommandBar
11
+ from wrappers import *
12
+ from widget import *
13
+ import glob
14
+ import subprocess
15
+ import animated_property
16
+ if sys .platform == 'win32' :
17
+ import _winreg
18
+ except (Exception ):
19
+ logger .exception ("exception!" )
20
+ raise
21
+
22
+
23
+
24
+
19
25
#TODO: make this configurable
20
26
ORIENTATION = 1
21
27
@@ -814,31 +820,6 @@ def DoScan(self,TimeNow):
814
820
815
821
816
822
self .TimeOld = TimeNow
817
-
818
- #environment.set("character_spacing", -2)
819
-
820
-
821
- try :
822
- screenWidth = talkshowConfig .windowWidth
823
- screenHeight = talkshowConfig .windowHeight
824
- if screenHeight == 0 or screenWidth == 0 :
825
- screenWidth = int (style .page .width )
826
- screenHeight = int (style .page .height )
827
- except :
828
- screenWidth = int (style .page .width )
829
- screenHeight = int (style .page .height )
830
-
831
-
832
- screen = Screen ("KommHelp Talkshow" , "" ,screenWidth , screenHeight )
833
-
834
-
835
- logger .debug ("initialising talkshow." )
836
-
837
-
838
- talkshow = Talkshow (screen )
839
-
840
- screen .event_handler = talkshow
841
-
842
823
843
824
# boilerplate
844
825
def tick ():
@@ -859,6 +840,38 @@ def tick():
859
840
talkshow .DoScan (TimeNow )
860
841
861
842
return True
843
+
844
+
845
+ try :
846
+
847
+
848
+ try :
849
+ screenWidth = talkshowConfig .windowWidth
850
+ screenHeight = talkshowConfig .windowHeight
851
+ if screenHeight == 0 or screenWidth == 0 :
852
+ screenWidth = int (style .page .width )
853
+ screenHeight = int (style .page .height )
854
+ except :
855
+ screenWidth = int (style .page .width )
856
+ screenHeight = int (style .page .height )
857
+
858
+
859
+ screen = Screen ("KommHelp Talkshow" , "" ,screenWidth , screenHeight )
860
+
861
+
862
+ logger .debug ("initialising talkshow." )
863
+
864
+
865
+ talkshow = Talkshow (screen )
866
+
867
+ screen .event_handler = talkshow
868
+
869
+
870
+
871
+
872
+ pc = PeriodicCall (tick ,0 )
873
+ pyglet .app .run ()
862
874
863
- pc = PeriodicCall (tick ,0 )
864
- pyglet .app .run ()
875
+ except (Exception ):
876
+ logger .exception ("exception!" )
877
+ raise
0 commit comments