From 748bb567eef19dcd8e067934786950c5866dc580 Mon Sep 17 00:00:00 2001 From: Adrien Tétar Date: Thu, 17 Sep 2015 21:48:34 +0200 Subject: meta: cleanup past experiments and set up a proper package structure --- Lib/defconQt/__main__.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Lib/defconQt/__main__.py (limited to 'Lib/defconQt/__main__.py') diff --git a/Lib/defconQt/__main__.py b/Lib/defconQt/__main__.py new file mode 100644 index 0000000..babcc73 --- /dev/null +++ b/Lib/defconQt/__main__.py @@ -0,0 +1,26 @@ +from defcon import Font +from defconQt.fontView import MainWindow +import sys + +from PyQt5.QtGui import QIcon +from PyQt5.QtWidgets import QApplication + +if len(sys.argv) < 2: + ufoFile = "C:\\CharterNova-Regular.ufo" +# print('Usage: %s INPUTFILE' % sys.argv[0]) +# sys.exit(1) +else: + ufoFile = sys.argv[1] + +#from pycallgraph import PyCallGraph +#from pycallgraph.output import GraphvizOutput +from defconQt import representationFactories +representationFactories.registerAllFactories() +#with PyCallGraph(output=GraphvizOutput()): +app = QApplication(sys.argv) +# TODO: http://stackoverflow.com/a/21330349/2037879 +app.setWindowIcon(QIcon("resources/icon.png")) +window = MainWindow(Font(ufoFile)) +window.resize(605, 430) +window.show() +sys.exit(app.exec_()) -- cgit v1.2.3