ソースを参照

demo test python

blumonilr 5 年 前
コミット
0f7b6dccff
1 ファイル変更2 行追加1 行削除
  1. 2 1
      demo/test.py

+ 2 - 1
demo/test.py

@@ -17,7 +17,7 @@ RESULT_STR = [
 ]
 
 def compileSrc(src_path):
-    if os.system('python %s'%src_path) != 0:
+    if os.system('python -m py_compile %s' % src_path) != 0:
         print('compile failure!')
         return False
     return True
@@ -66,6 +66,7 @@ def judge(src_path, td_path, td_total):
             exit(-1)
     os.remove('./m')
 
+
 if __name__ == '__main__':
     import sys
     if len(sys.argv) != 4: