(self, hostname, port)
| 148 | import subprocess |
| 149 | |
| 150 | def __init__(self, hostname, port): |
| 151 | self.process = subprocess.Popen( |
| 152 | [shutil.which("script"), "-c", shutil.which("node")], |
| 153 | stdin=subprocess.PIPE, |
| 154 | shell=False, |
| 155 | bufsize=0, |
| 156 | ) |
| 157 | print(self.process) |
| 158 | time.sleep(0.1) # wait for node to start |
| 159 | self.hostname = hostname |
| 160 | self.port = port |
| 161 | self.last_ret_code = None |
| 162 | |
| 163 | def load_pyodide(self, dist_dir): |
| 164 | self.execute_js( |