MCPcopy Create free account
hub / github.com/EasyIME/PIME / run

Method run

python/cinbase/__init__.py:3362–3387  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3360 ])
3361
3362 def run(self):
3363 if DEBUG_MODE:
3364 self.cbTS.debug.setStartTimer("LoadRCinTable")
3365
3366 self.RCinTable.loading = True
3367 selCinFile = self.rcinFileList[self.cbTS.cfg.selRCinType]
3368 jsonPath = os.path.join(self.cbTS.jsondir, selCinFile)
3369
3370 if self.RCinTable.cin is not None and hasattr(self.RCinTable.cin, '__del__'):
3371 self.RCinTable.cin.__del__()
3372
3373 self.RCinTable.cin = None
3374
3375 if os.path.exists(jsonPath):
3376 self.cbTS.RCinFileNotExist = False
3377 with io.open(jsonPath, 'r', encoding='utf8') as fs:
3378 self.RCinTable.cin = RCin(fs, self.cbTS.imeDirName)
3379 else:
3380 self.cbTS.RCinFileNotExist = True
3381
3382 self.RCinTable.curCinType = self.cbTS.cfg.selRCinType
3383 self.RCinTable.loading = False
3384
3385 if DEBUG_MODE:
3386 self.cbTS.debug.setEndTimer("LoadRCinTable")
3387 self.cbTS.debugLog[time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + " [R]"] = self.cbTS.debug.info['brand'] + ":「" + self.cbTS.debug.jsonNameDict[selCinFile] + "」反查碼表載入時間約為 " + self.cbTS.debug.getDurationTime("LoadRCinTable") + " 秒"
3388
3389
3390class LoadHCinTable(threading.Thread):

Callers

nothing calls this directly

Calls 7

RCinClass · 0.85
setStartTimerMethod · 0.80
joinMethod · 0.80
setEndTimerMethod · 0.80
getDurationTimeMethod · 0.80
__del__Method · 0.45
openMethod · 0.45

Tested by

no test coverage detected