py-vterm-interaction.el/scripts/get_env.py
Valentin Boettcher c0db7c24f8
implement repl restart
Co-authored-by: Shigeaki Nishina <shgaki@gmail.com>
2024-05-15 09:31:29 -04:00

12 lines
285 B
Python

def python_vterm__get_context(tempfile):
import json
import os
with open(tempfile, "w") as f:
context = dict(
env=["=".join(el) for el in list(os.environ.items())],
cwd=os.getcwd(),
)
json.dump(context, f)
del os, json