forked from poiuyqwert/PyMS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPyMPQ.pyw
More file actions
23 lines (18 loc) · 701 Bytes
/
Copy pathPyMPQ.pyw
File metadata and controls
23 lines (18 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python
from PyMS.Utilities.Compatibility import check_compat, Requirement
check_compat('PyMPQ', Requirement.MPQ)
def main():
from PyMS.PyMPQ.PyMPQ import PyMPQ, LONG_VERSION
import os, optparse, sys
if not sys.argv or (len(sys.argv) == 1 and os.path.basename(sys.argv[0]).lower() in ['','pympq.py','pympq.pyw','pympq.exe']):
gui = PyMPQ()
gui.startup()
else:
p = optparse.OptionParser(usage='usage: PyMPQ [options] <inp> [out]', version='PyMPQ %s' % LONG_VERSION)
p.add_option('--gui', help="Opens a file with the GUI", default='')
opt, _ = p.parse_args()
if opt.gui:
gui = PyMPQ(opt.gui)
gui.startup()
if __name__ == '__main__':
main()