-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainTIGrKieran.py
43 lines (34 loc) · 1.19 KB
/
MainTIGrKieran.py
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
38
39
40
41
42
43
# Created by Kieran Jerry Jonathon
from TIGr import AbstractInterface
from ParserJonathanV2 import Parser
class MainTIGr(AbstractInterface):
def __init__(self, parser):
super().__init__(parser)
def create_interface(self):
c = self.open_config()
if c[2] == 'FrontEndKieran':
from FrontEndKieran import TkinterInterface
self.interface = TkinterInterface(self)
elif c[2] == 'FrontEndJerry':
from FrontEndJerry import GuiInterface
self.interface = GuiInterface(self)
self.interface.start()
def open_config(self):
self.config = open('config.txt', "r+")
return self.config.read().splitlines()
def go(self):
self.create_interface()
if __name__ == '__main__':
config = open('config.txt', "r+")
c = config.read().splitlines()
# adapter = None
if c[0] == 'DrawerKieran':
from DrawerKieran import Drawer
# adapter = Adapter(Drawer())
elif c[0] == 'DrawerTurtleJack':
from DrawerTurtleJack import Drawer
# adapter = Adapter(Drawer())
config.close()
main = MainTIGr(Parser(Drawer()))
# main = MainTIGr(Parser(adapter))
main.go()