Debian Codegraph @

pypy/module/__pypy__/app_debug.py

raw symbols SCIP
1
2 def remote_exec(pid, filename, wait=True):
3 """
4 Executes a script of Python code in a given remote Python process.
5
6 Arguments:
7 pid (int): The process ID of the target Python process.
8
9 filename (str): A string containing the path to the file with the Python code to be executed.
10
11 wait (bool): Whether to wait for the target process to start the debug
12 script execution before remote_exec returns. True by default.
13 """
14 import operator
15 pid = operator.index(pid)
16 if isinstance(filename, bytes):
17 pass
18 elif isinstance(filename, unicode):
19 filename = filename.encode('utf-8')
20
21 from _pypy_remote_debug import start_debugger
22 start_debugger(pid, filename, bool(wait))
23