Parcourir la source

demo test python

blumonilr il y a 5 ans
Parent
commit
0f7b6dccff
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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: