MiRCART.py: import argv[1] into canvas if specified.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-01-11 01:18:50 +01:00
parent cf04a12690
commit d1936486ff

View File

@ -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)