From 77eb660f350a095c287ddf647acdd8b1891b3718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Thu, 11 Jan 2018 01:18:50 +0100 Subject: [PATCH] MiRCART.py: import argv[1] into canvas if specified. --- MiRCART.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MiRCART.py b/MiRCART.py index c03e793..d7bd121 100755 --- a/MiRCART.py +++ b/MiRCART.py @@ -29,7 +29,13 @@ import sys, wx # Entry point def main(*argv): wxApp = wx.App(False) - MiRCARTFrame(None) + appFrame = MiRCARTFrame(None) + if len(argv) > 1 \ + and len(argv[1]) > 0: + appFrame.panelCanvas.canvasInterface.canvasPathName = argv[1] + appFrame.panelCanvas.canvasImportStore.importTextFile(argv[1]) + appFrame.panelCanvas.canvasImportStore.importIntoPanel() + appFrame.onCanvasUpdate(pathName=argv[1], undoLevel=-1) wxApp.MainLoop() if __name__ == "__main__": main(*sys.argv)