[NFC][Coroutines] Use structured binding with llvm::enumerate in CoroSplit (#116879)
[llvm-project.git] / lldb / bindings / python / lldb-python
blob3bb3b332d8523c9a34c0a0e52f057396b29a3106
1 #!/usr/bin/env python3
3 import subprocess
4 import os
5 import sys
6 import json
8 lldb = os.path.join(os.path.dirname(__file__), 'lldb')
10 info_json = subprocess.run([lldb, "-l", "python", "-print-script-interpreter-info"],
11     check=True, stdout=subprocess.PIPE, encoding='utf8').stdout
12 info = json.loads(info_json)
14 os.environ["PYTHONPATH"] = (
15     info["lldb-pythonpath"] + os.path.pathsep + os.environ.get("PYTHONPATH", ""))
17 os.execl(info["executable"], info["executable"], *sys.argv[1:])