diff --git a/gui/Scyther.py b/gui/Scyther.py index 9b61a5a..62025e0 100755 --- a/gui/Scyther.py +++ b/gui/Scyther.py @@ -72,13 +72,16 @@ class Scyther(object): # from the error output (maybe this can also be done by flushing # the XML at certain points...) xmlinput = stdout.read() - self.errors = stderr.readlines() + errlines = stderr.readlines() # filter out any non-errors (say maybe only claim etc) and count # them. - # TODO for now this simply counts the lines + self.errors = [] + for l in errlines: + if not l.startswith("claim\t"): + self.errors.append(l.strip()) + self.errorcount = len(self.errors) - print self.errorcount # close stdout.close() diff --git a/gui/Scytherthread.py b/gui/Scytherthread.py index 1ec8f52..0bacf4d 100644 --- a/gui/Scytherthread.py +++ b/gui/Scytherthread.py @@ -181,7 +181,7 @@ class ErrorWindow(wx.Dialog): line = wx.StaticLine(self, -1, size=(20,-1), style=wx.LI_HORIZONTAL) sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5) - label = wx.StaticText(self, -1, "".join(errors)) + label = wx.StaticText(self, -1, "\n".join(errors)) sizer.Add(label, 0, wx.ALIGN_LEFT|wx.ALL, 5) sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5) diff --git a/gui/scyther-gui.py b/gui/scyther-gui.py index 3d6a8ff..09071ca 100755 --- a/gui/scyther-gui.py +++ b/gui/scyther-gui.py @@ -4,6 +4,7 @@ """ Import externals """ import wx +import sys #--------------------------------------------------------------------------- @@ -63,7 +64,15 @@ class ScytherApp(wx.App): splash.Show() """ Build up """ - self.mainWindow = Mainwindow.MainWindow('scythergui-default.spdl') + infile = '' + args = sys.argv[1:] + if len(args) > 0: + if args[0] == 'test': + infile = 'scythergui-default.spdl' + else: + infile = args[0] + + self.mainWindow = Mainwindow.MainWindow(infile) self.SetTopWindow(self.mainWindow) self.mainWindow.Show()