MCPcopy
hub / github.com/AirtestProject/Poco / __init__

Method __init__

poco/drivers/windows/windowsui_poco.py:35–50  ·  view source on GitHub ↗
(self, selector=None, addr=DEFAULT_ADDR, **options)

Source from the content-addressed store, hash-verified

33 """
34
35 def __init__(self, selector=None, addr=DEFAULT_ADDR, **options):
36 if 'action_interval' not in options:
37 options['action_interval'] = 0.1
38
39 if addr[0] == "localhost" or addr[0] == "127.0.0.1":
40 from poco.drivers.windows.sdk.WindowsUI import PocoSDKWindows
41 self.sdk = PocoSDKWindows(addr)
42 self.SDKProcess = threading.Thread(target=self.sdk.run) # 创建线程
43 self.SDKProcess.setDaemon(True)
44 self.SDKProcess.start()
45
46 dev = VirtualDevice(addr[0])
47 super(WindowsPoco, self).__init__(addr[1], dev, False, **options)
48
49 self.selector = selector
50 self.connect_window(self.selector)
51
52 @sync_wrapper
53 def connect_window(self, selector):

Callers

nothing calls this directly

Calls 4

connect_windowMethod · 0.95
PocoSDKWindowsClass · 0.90
VirtualDeviceClass · 0.90
startMethod · 0.80

Tested by

no test coverage detected