ya2 · news · projects · code · about

box
[pmachines.git] / main.py
CommitLineData
8ee66edd
FC
1'''This is the main file. This launches the application.'''
2from sys import argv
3from panda3d.core import load_prc_file_data
4if '--version' in argv:
5 load_prc_file_data('', 'window-type none')
6from os.path import exists
7from traceback import print_exc
8from pmachines.pmachines import Pmachines
9from p3d_appimage import AppImageBuilder
10
11if __name__ == '__main__' or exists('main.pyo'):
12 pmachines = Pmachines()
13 if pmachines.updating:
14 AppImageBuilder('pmachines').update()
15 elif not pmachines.version:
16 try: pmachines.base.run()
17 except Exception:
18 print_exc()