From 499b7cdef5d62298c17889895a61a110d7cd8168 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 3 Jul 2024 16:18:32 +0800 Subject: feat: rename `may_execute_*` to `execute_*` (#56) --- tools/execute_py_code.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tools/execute_py_code.py (limited to 'tools/execute_py_code.py') 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) -- cgit v1.2.3