-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathac.py
More file actions
31 lines (27 loc) · 683 Bytes
/
ac.py
File metadata and controls
31 lines (27 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import argparse
import sys
import os
import subprocess
from logging import getLogger, basicConfig, INFO
logger = getLogger(__name__)
import gen
import tester
import submit
import hack
from colors import pycolor
def main(args):
if args:
cmd = args[0]
args = args[1:]
if cmd in ['test', 't']:
tester.main(args)
elif cmd in ['gen', 'g']:
gen.main(args)
elif cmd in ['submit', 's']:
submit.main(args)
elif cmd in ['hack', 'h']:
hack.main(args)
else:
subprocess.call("atcoder-tools" + cmd + args)
else:
logger.error(pycolor.BRIGHT_RED + " arg empty.")