upgrade to python3
This commit is contained in:
8
judge
8
judge
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user