ya2 · news · projects · code · about

scene: teeter tooter
[pmachines.git] / main.py
CommitLineData
8ee66edd 1'''This is the main file. This launches the application.'''
c7093023 2import lib.engine.log # so logging's info/debug are logged
8ee66edd
FC
3from sys import argv
4from panda3d.core import load_prc_file_data
5if '--version' in argv:
6 load_prc_file_data('', 'window-type none')
7from os.path import exists
8from traceback import print_exc
c8035584 9from pmachines.app import PmachinesApp
8ee66edd
FC
10from p3d_appimage import AppImageBuilder
11
12if __name__ == '__main__' or exists('main.pyo'):
c8035584 13 pmachines = PmachinesApp()
8ee66edd
FC
14 if pmachines.updating:
15 AppImageBuilder('pmachines').update()
16 elif not pmachines.version:
17 try: pmachines.base.run()
18 except Exception:
19 print_exc()