forked from andrebarks/sm64-randomizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (24 loc) · 745 Bytes
/
main.py
File metadata and controls
30 lines (24 loc) · 745 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
#!/usr/bin/env python
from __version__ import __version__
print(f' Super Mario 64 Randomizer (Version: {__version__})\n')
import sys
if __name__ != '__main__':
print("Dont import this")
sys.exit(2)
if len(sys.argv) <= 1:
# assume we want to start the GUI
print("starting gui...")
import gui
sys.exit(0)
import os
import logging
if 'DEBUG' in os.environ:
logging.basicConfig(level=logging.DEBUG, format="%(message)s")
else:
logging.basicConfig(filename="sm64_rando_debug.log", level=logging.DEBUG, filemode="w", format="%(asctime)s %(module)s %(message)s")
from CLI import run_with_args
try:
run_with_args()
except Exception as err:
print(f'Unfortunately, the randomizer encountered an error, seen below:')
raise err