@@ -19,8 +19,7 @@ except:
19
19
cnf = ConfigParser ()
20
20
cnf .read (PWD + 'default.ini' )
21
21
PATH_GLOSS = os .path .expanduser (cnf .get ('gloss "foss"' , 'path' ) + 'en2np/' )
22
- tmp = cnf .get ('fonts' , 'viewer' ).split ()
23
- def_FONT = [ ' ' .join (tmp [:- 1 ]), tmp [- 1 ] ]
22
+ def_FONT = [ "Arial" , "13" ]
24
23
25
24
FILE_TYPES = ["tsl" , "fun" , "abb" , "tra" , "txt" ]
26
25
@@ -83,11 +82,11 @@ class Browser(Frame):
83
82
84
83
def fill_tree (self , _gloss ):
85
84
try : # py2/3 compatibility
86
- data = open (self .GLOSS , encoding = "UTF-8 " ).read ()
85
+ data = open (self .GLOSS , encoding = "utf8 " ).read ()
87
86
except :
88
87
# for python2
89
88
data = open (self .GLOSS ).read ()
90
- data = data .decode ('utf-8 ' )
89
+ data = data .decode ('utf8 ' )
91
90
92
91
self .count = 0
93
92
for line in data .splitlines ():
@@ -97,7 +96,7 @@ class Browser(Frame):
97
96
try :
98
97
row [2 ] = row [2 ][1 :] # remove space
99
98
except :
100
- print ("File Format Error: %s: %d" % (self .GLOSS , self .count ))
99
+ # print("File Format Error: %s: %d"%(self.GLOSS, self.count))
101
100
exit ()
102
101
self .select = self .tree .insert ('' , 'end' , values = row , tag = "npfont" )
103
102
0 commit comments