forked from larryhastings/pyweek24
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_game.py
More file actions
37 lines (27 loc) · 694 Bytes
/
run_game.py
File metadata and controls
37 lines (27 loc) · 694 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
32
33
34
35
36
37
import sys
if sys.version_info < (3, 6):
sys.exit(
"This game requires Python 3.6 or later."
)
import os
from pathlib import Path
dist = Path(__file__).parent.resolve()
src = str(dist / 'src')
sys.path.insert(0, src)
os.chdir(src)
try:
import main
except ImportError:
import traceback
traceback.print_exc()
req = dist / 'requirements.txt'
sys.exit(
"""
Please ensure you have the following packages installed:
%s
You can run 'pip install -r requirements.txt' to install these (currently this
will require a compiler to be configured).
You will also require AVBin from
https://avbin.github.io/AVbin/Download.html
""" % req.read_text()
)