forked from digiholic/universalSmashSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·42 lines (34 loc) · 1016 Bytes
/
main.py
File metadata and controls
executable file
·42 lines (34 loc) · 1016 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
38
39
40
41
#!/usr/bin/env python
from __future__ import print_function
import pygame
import engine.stage
import stages.true_arena as stage
import settingsManager
import imp
import os
from menu.menu import *
from pygame.locals import *
from engine import *
from builder import *
from fighters import *
from menu import *
from stages import *
def main(debug = False):
Menu()
def importFromURI(file, uri, absl=False):
if not absl:
uri = os.path.normpath(os.path.join(os.path.dirname(file), uri))
path, fname = os.path.split(uri)
mname, ext = os.path.splitext(fname)
no_ext = os.path.join(path, mname)
#if os.path.exists(no_ext + '.pyc'):
#try:
#return imp.load_compiled(mname, no_ext + '.pyc')
#except:
#pass
if os.path.exists(no_ext + '.py'):
try:
return imp.load_source(mname, no_ext + '.py')
except Exception as e:
print(mname, e)
if __name__ == '__main__': main(True)