upgrade to python3

This commit is contained in:
2026-02-08 11:23:34 +08:00
parent 487c041148
commit 9b20887cc2
9 changed files with 139 additions and 195 deletions

8
judge
View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python2.6
#!/usr/bin/env python3
import os, signal, sys, logging, logging.handlers
judge = None
def setup_logging():
@@ -43,10 +44,13 @@ def main():
config = getConfig()
config.judgehome = judgehome
vars = {'config': config}
execfile(sys.argv[1], vars, vars)
with open(sys.argv[1], 'rb') as conf_file:
code = conf_file.read()
exec(compile(code, sys.argv[1], 'exec'), vars, vars)
setup_logging()
from engine import JudgeEngine
judge = JudgeEngine()