diff --git a/gooey/gui/util/quoting.py b/gooey/gui/util/quoting.py index 179fbed..ae6710b 100644 --- a/gooey/gui/util/quoting.py +++ b/gooey/gui/util/quoting.py @@ -1,6 +1,4 @@ -import re import sys -import re if sys.platform.startswith("win"): @@ -9,7 +7,3 @@ if sys.platform.startswith("win"): else: # POSIX shell def quote(value): return "'{}'".format('{}'.format(value).replace("'", "'\\''")) - - -def maybe_quote(string): - return '"{}"'.format(string) if not re.match(r'^".*"$', string) else string diff --git a/gooey/gui/widgets/components.py b/gooey/gui/widgets/components.py index ca875be..eab4ee0 100644 --- a/gooey/gui/widgets/components.py +++ b/gooey/gui/widgets/components.py @@ -243,6 +243,7 @@ DirChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_ FileSaver = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.FileSaverPayload()) DateChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.DateChooserPayload()) TextField = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.TextInputPayload()) +CommandField = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.TextInputPayload(no_qouting=True)) Dropdown = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.DropdownPayload()) Counter = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.CounterPayload()) MultiDirChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.MultiDirChooserPayload()) diff --git a/gooey/gui/windows/layouts.py b/gooey/gui/windows/layouts.py index 519b692..ae8deca 100644 --- a/gooey/gui/windows/layouts.py +++ b/gooey/gui/windows/layouts.py @@ -11,7 +11,7 @@ from gooey.gui.util.quoting import quote basic_config = { 'required': [{ - 'type': 'TextField', + 'type': 'CommandField', 'data': { 'display_name': 'Enter Commands', 'help': 'Enter command line arguments',