2016-07-10 16:40:50 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import sys
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
from VDMAPI.Display.console import console as display
|
|
|
|
|
|
|
|
if "-d" in sys.argv:
|
|
|
|
index = next(i for i, c in enumerate(sys.argv) if c == "-d")
|
|
|
|
|
|
|
|
if len(sys.argv) > index+1:
|
|
|
|
displayType = sys.argv[index+1]
|
|
|
|
if displayType == "i3":
|
|
|
|
from VDMAPI.Display.i3 import i3 as display
|
|
|
|
|
|
|
|
elif displayType == "tkinter":
|
|
|
|
from VDMAPI.Display.tkinter import tkinter as display
|
|
|
|
|
2016-07-17 21:15:18 +00:00
|
|
|
elif displayType == "kivy":
|
|
|
|
from VDMAPI.Display.kivyDisplay import kivyApp as display
|
|
|
|
d = display()
|
|
|
|
d.run()
|
|
|
|
sys.exit()
|
2016-07-10 16:40:50 +00:00
|
|
|
|
|
|
|
elif displayType == "console":
|
2016-07-17 21:15:18 +00:00
|
|
|
pass
|
2016-07-10 16:40:50 +00:00
|
|
|
|
|
|
|
else:
|
2016-07-17 21:15:18 +00:00
|
|
|
print("Error bad display mode accepted value are : i3, tkinter, kivy of console")
|
|
|
|
sys.exit()
|
2016-07-10 16:40:50 +00:00
|
|
|
else:
|
2016-07-17 21:15:18 +00:00
|
|
|
print("Error too few argument -d need value : i3, tkinter, kivy of console")
|
|
|
|
sys.exit()
|
2016-07-10 16:40:50 +00:00
|
|
|
|
|
|
|
d = display()
|
|
|
|
d.render()
|