-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWinLauncher.py
More file actions
37 lines (26 loc) · 814 Bytes
/
WinLauncher.py
File metadata and controls
37 lines (26 loc) · 814 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
# coding=utf-8
"""
A windowed-mode entry point for Pi-MFD
"""
import traceback
from PiMFD.Options import MFDAppOptions
from PiMFD.UI.DisplayManager import DisplayManager
__author__ = 'Matt Eland'
log = open("PiMFD.log", "w")
try:
# Initialize our settings. This will create a default settings file if none exists
app_options = MFDAppOptions()
app_options.load_from_settings()
app_options.save_to_settings()
# Build a display using the standard windowed sizes. This is great for desktop testing.
display = DisplayManager()
display.is_fullscreen = False
# Launch
display.start_mfd(app_options)
except:
error_message = "Unhandled error {0}\n".format(str(traceback.format_exc()))
print(error_message)
log.write(error_message)
finally:
log.close()
pass