tkinter might not work

This commit is contained in:
Martin Diehl 2020-03-14 00:07:49 +01:00
parent d707378820
commit 3d8e8cfe7a
1 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,3 @@
import tkinter
import os
class Environment():
@ -6,10 +5,14 @@ class Environment():
def __init__(self):
"""Read and provide values of DAMASK configuration."""
self.options = self._get_options()
try:
import tkinter
tk = tkinter.Tk()
self.screen_width = tk.winfo_screenwidth()
self.screen_height = tk.winfo_screenheight()
except Exception:
self.screen_width = 1024
self.screen_height = 768
def relPath(self,relative = '.'):
"""Return absolute path from path relative to DAMASK root."""