From 5af72b4f99686ac0e57cbc6133b2fe7b125c2ae0 Mon Sep 17 00:00:00 2001 From: Boyan Date: Wed, 4 Dec 2024 02:39:12 +0100 Subject: [PATCH] Added pypy support --- ucompile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ucompile b/ucompile index 7140d98..92ed420 100755 --- a/ucompile +++ b/ucompile @@ -122,7 +122,14 @@ def run_input_cases(program, args): def python_compile(file_name, args): - run_input_cases("python3 " + file_name, args) + try: + if subprocess.run(["which", "pypy3"]).returncode == 0: + run_input_cases("pypy3 " + file_name, args) + return + except Exception: + pass + finally: + run_input_cases("python3 " + file_name, args) return