36 lines
864 B
Python
Executable File
36 lines
864 B
Python
Executable File
#!/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
|
|
|
|
elif displayType == "kivy":
|
|
from VDMAPI.Display.kivyDisplay import kivyApp as display
|
|
d = display()
|
|
d.run()
|
|
sys.exit()
|
|
|
|
elif displayType == "console":
|
|
pass
|
|
|
|
else:
|
|
print("Error bad display mode accepted value are : i3, tkinter, kivy of console")
|
|
sys.exit()
|
|
else:
|
|
print("Error too few argument -d need value : i3, tkinter, kivy of console")
|
|
sys.exit()
|
|
|
|
d = display()
|
|
d.render()
|