-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (27 loc) · 814 Bytes
/
main.py
File metadata and controls
31 lines (27 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
""" GUI version of the program """
import settings
import os.path
if os.path.exists(settings.SQLiteDBLocation):
pass
import mainWindow
mainWindow.run()
else:
print("Database does not exist")
print("Please check that the database file location set in settings.py is correct")
print("Do you want to create a new database now? y/n")
if input() == "y" or "Y":
import sql
print("Imported SQL Module")
print("Creating Tables")
try:
sql.createTables()
print("Tables Created")
except:
print("Unable to create Tables")
print("Starting GUI")
import mainWindow
mainWindow.run()
print("GUI started")
else:
import os
os.close()