MCPcopy Create free account
hub / github.com/a943512/PyAibote / execute

Method execute

PyAibote/WindowsBot.py:103–120  ·  view source on GitHub ↗
(self, IP: str, Port: int, Debug: bool = True, Qt = None, WebsocketSwitch = False, WebsocketPort = 8888)

Source from the content-addressed store, hash-verified

101
102 @classmethod
103 def execute(self, IP: str, Port: int, Debug: bool = True, Qt = None, WebsocketSwitch = False, WebsocketPort = 8888):
104 try:
105 if Port < 0 or Port > 65535:
106 raise OSError("`listen_port` must be in 0-65535.")
107
108 if Qt:
109 self.Qt = Qt
110
111 if Debug:
112 Driver.WindowsDriverStart(IP, Port)
113
114 if WebsocketSwitch:
115 server = WebSocketServerThread(IP, WebsocketPort, self.Websocket_Log_Level)
116 server.start()
117
118 ThreadingTCPServer.StartThreadingTCPServer(self, IP, Port)
119 except KeyboardInterrupt as e:
120 sys.exit(self)
121
122 @classmethod
123 def StopSrver(self):

Callers

nothing calls this directly

Calls 3

WindowsDriverStartMethod · 0.80

Tested by

no test coverage detected