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

Method enumerateServices

python/serviceManager.py:71–82  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69 self.enumerateServices()
70
71 def enumerateServices(self):
72 # To enumerate currently installed Input Method
73 currentDir = os.path.dirname(os.path.abspath(__file__))
74 input_methods_dir = os.path.join(currentDir, "input_methods")
75 for subdir in os.listdir(input_methods_dir):
76 filename = os.path.join(input_methods_dir, subdir, "ime.json")
77 if os.path.exists(filename):
78 info = TextServiceInfo()
79 info.loadFromJson(filename)
80 print(info.guid)
81 if info.guid:
82 self.services[info.guid] = info
83
84 def createService(self, client, guid):
85 guid = guid.lower()

Callers 1

__init__Method · 0.95

Calls 4

loadFromJsonMethod · 0.95
TextServiceInfoClass · 0.85
joinMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected