-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun.py
More file actions
executable file
·21 lines (18 loc) · 838 Bytes
/
run.py
File metadata and controls
executable file
·21 lines (18 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3
"""Entry point script for the ExamGrader application."""
import sys
from examgrader.main import main
from examgrader.web import app
if __name__ == '__main__':
if '--web' in sys.argv:
import argparse
parser = argparse.ArgumentParser(description='ExamGrader - Web Interface')
parser.add_argument('--web', action='store_true', help='Start web interface')
parser.add_argument('--host', default='127.0.0.1', help='Host for web interface')
parser.add_argument('--port', type=int, default=5000, help='Port for web interface')
args = parser.parse_args()
print(f"Starting web interface at http://{args.host}:{args.port}")
app.run(host=args.host, port=args.port)
else:
# Pass all arguments to main() function
sys.exit(main())