From d226c81fc7cca7102a7f8e3f10a36298796ffa64 Mon Sep 17 00:00:00 2001 From: chriskiehl Date: Sat, 22 Nov 2014 21:36:13 -0500 Subject: [PATCH] Removed debug statements --- gooey/gui/action_sorter.py | 3 +-- gooey/gui/client_app.py | 1 - gooey/gui/components.py | 4 ---- gooey/gui/controller.py | 1 - gooey/gui/image_repository.py | 1 - gooey/gui/widgets/components2.py | 6 +----- gooey/gui/windows/advanced_config.py | 1 - gooey/python_bindings/argparse_to_json.py | 11 ----------- gooey/python_bindings/source_parser.py | 3 --- 9 files changed, 2 insertions(+), 29 deletions(-) diff --git a/gooey/gui/action_sorter.py b/gooey/gui/action_sorter.py index 513a34f..9a15e30 100644 --- a/gooey/gui/action_sorter.py +++ b/gooey/gui/action_sorter.py @@ -67,7 +67,6 @@ class ActionSorter(object): self._display('ActionSorter: optionals', self._optionals) self._display('ActionSorter: booleans', self._flags) self._display('ActionSorter: counters', self._counters) - print '|-------------------------' def _display(self, _type, something): for i in something: @@ -138,4 +137,4 @@ class ActionSorter(object): if __name__ == '__main__': - pass \ No newline at end of file + pass diff --git a/gooey/gui/client_app.py b/gooey/gui/client_app.py index f4d2122..9f081f4 100644 --- a/gooey/gui/client_app.py +++ b/gooey/gui/client_app.py @@ -28,7 +28,6 @@ class ClientApp(object): def _Parse(self, arg_string): try: - print self._parser.error self._parser.parse_args(arg_string.split()) return True except Exception as e: diff --git a/gooey/gui/components.py b/gooey/gui/components.py index 4e345f7..0cddabe 100644 --- a/gooey/gui/components.py +++ b/gooey/gui/components.py @@ -127,9 +127,7 @@ class AbstractGuiComponent(object): width, height = size content_area = int((width / 2) * .87) - print 'wiget size', help_msg.Size[0] wiggle_room = range(int(content_area - content_area * .05), int(content_area + content_area * .05)) - print '(', int(content_area - content_area * .05), ' -> ', int(content_area + content_area * .05), ')' if help_msg.Size[0] not in wiggle_room: self._msg.SetLabel(self._msg.GetLabelText().replace('\n', ' ')) self._msg.Wrap(content_area) @@ -243,9 +241,7 @@ class AbstractComponent(object): width, height = size content_area = int((width / 2) * .87) - print 'wiget size', help_msg.Size[0] wiggle_room = range(int(content_area - content_area * .05), int(content_area + content_area * .05)) - print '(', int(content_area - content_area * .05), ' -> ', int(content_area + content_area * .05), ')' if help_msg.Size[0] not in wiggle_room: self._msg.SetLabel(self._msg.GetLabelText().replace('\n', ' ')) self._msg.Wrap(content_area) diff --git a/gooey/gui/controller.py b/gooey/gui/controller.py index 8ffac5e..32fbddd 100644 --- a/gooey/gui/controller.py +++ b/gooey/gui/controller.py @@ -40,7 +40,6 @@ class Controller(object): msg = i18n.translate('sure_you_want_to_exit') dlg = wx.MessageDialog(None, msg, i18n.translate('close_program'), wx.YES_NO) result = dlg.ShowModal() - print result if result == YES: dlg.Destroy() self.core_gui.Destroy() diff --git a/gooey/gui/image_repository.py b/gooey/gui/image_repository.py index 33f25e9..29748cb 100644 --- a/gooey/gui/image_repository.py +++ b/gooey/gui/image_repository.py @@ -24,7 +24,6 @@ def _list_images(): stmnts = ('{0} = os.path.join(image_dir, "{1}")' .format(os.path.splitext(im)[0], im) for im in images) - print '\n'.join(stmnts) # _list_images() diff --git a/gooey/gui/widgets/components2.py b/gooey/gui/widgets/components2.py index 272e03d..8f572ed 100644 --- a/gooey/gui/widgets/components2.py +++ b/gooey/gui/widgets/components2.py @@ -91,10 +91,7 @@ class BaseGuiComponent(object): self.panel.Size = evt.GetSize() container_width, _ = self.panel.Size text_width, _ = self.help_msg.Size - # if self.widget_pack.getValue() and '-c' in self.widget_pack.getValue(): - # print 'text width:', text_width - # print 'cont width:', container_width - # print + if text_width != container_width: self.help_msg.SetLabel(self.help_msg.GetLabelText().replace('\n', ' ')) self.help_msg.Wrap(container_width) @@ -221,7 +218,6 @@ class RadioGroup(object): # print self.option_stings[vals.index(True)] try: opts = self.option_stings[vals.index(True)][0] - print opts except: return '' diff --git a/gooey/gui/windows/advanced_config.py b/gooey/gui/windows/advanced_config.py index 6485675..69463e6 100644 --- a/gooey/gui/windows/advanced_config.py +++ b/gooey/gui/windows/advanced_config.py @@ -111,7 +111,6 @@ class AdvancedConfigPanel(ScrolledPanel, OptionReader): values = [c.GetValue() for c in self.components if c.GetValue() is not None] - print values return ' '.join(values) def GetRequiredArgs(self): diff --git a/gooey/python_bindings/argparse_to_json.py b/gooey/python_bindings/argparse_to_json.py index ab70d0c..c5fe56d 100644 --- a/gooey/python_bindings/argparse_to_json.py +++ b/gooey/python_bindings/argparse_to_json.py @@ -183,7 +183,6 @@ def get_mutually_exclusive_optionals(mutex_group): def as_json(action, widget): - print 'widget:', widget if widget not in VALID_WIDGETS: raise UnknownWidgetType('Widget Type {0} is unrecognized'.format(widget)) @@ -201,14 +200,4 @@ def as_json(action, widget): -def is_widget_spec(option_string): - return option_string and option_string in VALID_WIDGETS - -def widget_type(option_string): - return option_string[1:] - - - - - diff --git a/gooey/python_bindings/source_parser.py b/gooey/python_bindings/source_parser.py index 81a2be1..2888b6c 100644 --- a/gooey/python_bindings/source_parser.py +++ b/gooey/python_bindings/source_parser.py @@ -57,8 +57,6 @@ def parse_source_file(file_name): add_arg_assignments # parse_args_assignment ) - # for i in ast_argparse_source: - # print i return ast_argparse_source def _openfile(file_name): @@ -156,7 +154,6 @@ if __name__ == '__main__': # ast_source = parse_source_file(filepath) python_code = convert_to_python(list(ast_source)) - for i in python_code: print i