aboutsummaryrefslogtreecommitdiffstats
path: root/tools/execute_py_code.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/execute_py_code.py')
-rw-r--r--tools/execute_py_code.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/execute_py_code.py b/tools/execute_py_code.py
new file mode 100644
index 0000000..5f6af2f
--- /dev/null
+++ b/tools/execute_py_code.py
@@ -0,0 +1,6 @@
+def run(code: str):
+ """Runs the python code.
+ Args:
+ code: Python code to execute, such as `print("hello world")`
+ """
+ exec(code)