MCPcopy Create free account
hub / github.com/decodecaptcha/Browser-Env / Show

Class Show

examples/example_SF.py:19–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19class Show():
20
21 def __init__(self):
22 self.child_pid = None
23
24 def show(self, file_name):
25 shell_process = subprocess.Popen(f'{file_name}', shell=True)
26 parent = psutil.Process(shell_process.pid)
27 for _ in range(999):
28 children = parent.children(recursive=True)
29 if children:
30 break
31 time.sleep(0.1)
32 self.child_pid = children[0].pid
33
34 def close(self):
35 subprocess.check_output(f"Taskkill /PID {self.child_pid} /F")
36
37
38class HttpbinEnv(WireBrowserEnv):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected