equal
deleted
inserted
replaced
315 if dialog.ShowModal() == wx.ID_OK: |
315 if dialog.ShowModal() == wx.ID_OK: |
316 filepath = dialog.GetPath() |
316 filepath = dialog.GetPath() |
317 message_text = "" |
317 message_text = "" |
318 header, icon = _("Done"), wx.ICON_INFORMATION |
318 header, icon = _("Done"), wx.ICON_INFORMATION |
319 if os.path.isdir(os.path.dirname(filepath)): |
319 if os.path.isdir(os.path.dirname(filepath)): |
320 program, errors, warnings = self.Controler.GenerateProgram(filepath) |
320 _program, errors, warnings = self.Controler.GenerateProgram(filepath) |
321 message_text += "".join([_("warning: %s\n") % warning for warning in warnings]) |
321 message_text += "".join([_("warning: %s\n") % warning for warning in warnings]) |
322 if len(errors) > 0: |
322 if len(errors) > 0: |
323 message_text += "".join([_("error: %s\n") % error for error in errors]) |
323 message_text += "".join([_("error: %s\n") % error for error in errors]) |
324 message_text += _("Can't generate program to file %s!") % filepath |
324 message_text += _("Can't generate program to file %s!") % filepath |
325 header, icon = _("Error"), wx.ICON_ERROR |
325 header, icon = _("Error"), wx.ICON_ERROR |
388 # print help information and exit: |
388 # print help information and exit: |
389 self.PrintUsage() |
389 self.PrintUsage() |
390 sys.exit(2) |
390 sys.exit(2) |
391 |
391 |
392 # Extract if help has been requested |
392 # Extract if help has been requested |
393 for o, a in opts: |
393 for o, _a in opts: |
394 if o in ("-h", "--help"): |
394 if o in ("-h", "--help"): |
395 self.PrintUsage() |
395 self.PrintUsage() |
396 sys.exit() |
396 sys.exit() |
397 |
397 |
398 # Extract the optional filename to open |
398 # Extract the optional filename to open |