chriskiehl / gooeyexamples Goto Github PK
View Code? Open in Web Editor NEWExample programs to Demonstrate Gooey's functionality
License: MIT License
Example programs to Demonstrate Gooey's functionality
License: MIT License
The Cancel and OK (or maybe Run?) buttons are white text on very light grey. Nearly invisible.
Text field outlines seem to have the same problem. I had to click around a bit to find them.
https://github.com/nelsonjchen/gooey-pyinstaller-demo
I made this demo project last year that demos using Gooey with PyInstaller and building it on Azure Pipelines.
https://github.com/MahApps/MahApps.Metro/releases/tag/2.0.0-alpha.83
Do you think it might be helpful to release out exes/.app versions of these applications to give users quick samples of Gooey applications? The MahApps.Metro example I linked above could be considered a demo for their widget library.
Now that Gooey support Python 3, perhaps the examples should be ported over? Or maybe two separate versions of the examples is an okay solution
GooeyExamples/
├─ examples
└─ py2examples
I imagine it should be a simple 2to3 *.py
, but I haven't really studied the examples in detail (yet), I just discovered this issue today when trying to run the examples for the first time.
2024-03-17 22:44:10.450 Python[84598:6131747] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
I get this with a simple script that just has
@gooey
def main (argv):
...
Hi, I have checked GooeyExamples, but can't find example usage of RadioGroup. Could you please provide one ?
Thank you.
Describe the bug
running python3.8 examples/lifecycle_hooks.py
generates an exception: `ImportError: cannot import name 'Events' from 'gooey'.
To Reproduce
Steps to reproduce the behavior:
git clone https://github.com/chriskiehl/GooeyExamples.git
cd GooeyExamples
pip install -r requirements.txt
python3.8 examples/lifecycle_hooks.py
Traceback (most recent call last):
File "examples/lifecycle_hooks.py", line 4, in <module>
from gooey import Events, Gooey, GooeyParser
ImportError: cannot import name 'Events' from 'gooey' (/.../python3.8/site-packages/gooey/__init__.py)
Expected behavior
Example runs without error
Desktop (please complete the following information):
Traceback (most recent call last):
File "GooeyExamples\examples\simple_demo.py", line 30, in <module>
main()
File "gooey\python_bindings\gooey_decorator.py", line 58, in inner2
return payload(*args, **kwargs)
File "GooeyExamples\examples\simple_demo.py", line 24, in main
help='I turn things on and off')
File "gooey\python_bindings\gooey_parser.py", line 28, in add_argument
self.parser.add_argument(*args, **kwargs)
File "C:\Anaconda\lib\argparse.py", line 1294, in add_argument
action = action_class(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'metavar'
with today's clone of /GooeyExamples, and this version
pip install gooey
import gooey
print gooey.__version__
0.8.11.1
Describe the bug
richtext_demo is only displaying plaintext
To Reproduce
Steps to reproduce the behavior:
git clone https://github.com/chriskiehl/GooeyExamples.git
C:\Users\kevin\dev\python>pip install -r GooeyExamples\requirements.txt
richtext_demo.py
C:\Users\kevin\dev\python>python -V
Python 3.9.13
C:\Users\kevin\dev\python>python GooeyExamples\examples\richtext_demo.py
This is the same behavior through WSL on python 3.8 (VcXsrv)
Expected behavior
richtext_demo to show like this:
Desktop (please complete the following information):
OS: Windows 11
Version: Python on 3.9.13
[ x ] OS
[ x ] Python Version
Gooey Version
Thorough description of problem
A minimal code example -- preferably copy/pastable in the issue itself (less time figuring out how to run your code == more time debugging!)
Screenshot (if visual quirk)
Additional context
N/A
After I install Gooey and go to the GooeyExamples-master directory use this command:
pip install -r requirements.txt
The above commands all execute correctly.
it@it51:~/GooeyExamples-master/examples$ sudo python widget_demo.py
[sudo] password for ankon:
Writing Build Config to: gooey_config.json
No protocol specified
Unable to access the X Display, is $DISPLAY set properly?
The graphics card of my computer is Quadro P4000 , and the command "nvidia-smi" show :
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.31 Driver Version: 440.31 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
How do I solve this problem: Unable to access the X Display, is $DISPLAY set properly?
Hi,
Just a small correction ;)
to
navigation='TABBED'
Describe the bug
Traceback (most recent call last):
File "/Users/admin/sources/combiner/combiner.py", line 145, in <module>
main()
File "/usr/local/lib/python3.11/site-packages/gooey/python_bindings/gooey_decorator.py", line 128, in inner2
return payload(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/admin/sources/combiner/combiner.py", line 136, in main
args = parser.parse_args()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gooey/python_bindings/gooey_parser.py", line 125, in parse_args
return self.parser.parse_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gooey/python_bindings/gooey_decorator.py", line 123, in run_gooey
application.run(build_spec)
File "/usr/local/lib/python3.11/site-packages/gooey/gui/application.py", line 21, in run
app, _ = build_app(build_spec)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gooey/gui/application.py", line 27, in build_app
return _build_app(build_spec, app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gooey/gui/application.py", line 40, in _build_app
gapp = GooeyApplication(merge(build_spec, imagesPaths))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gooey/gui/containers/application.py", line 47, in __init__
self.console = Console(self, buildSpec)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gooey/gui/components/console.py", line 21, in __init__
self.textbox = RichTextConsole(self)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gooey/gui/components/widgets/richtextconsole.py", line 45, in __init__
self.esc = colored.style.ESC
^^^^^^^^^^^^^^^^^
AttributeError: 'function' object has no attribute 'ESC'
To Reproduce
Steps to reproduce the behavior:
@Gooey(progress_regex=r"^Progress: (?P<current>\d+)/(?P<total>\d+)$", progress_expr="current / total * 100",show_restart_button=False, richtext_controls=True)
richtext_controls=True
fixes it, but this isn't expected behavior.Expected behavior
Desktop (please complete the following information):
Python3
Traceback (most recent call last):
File "dynamic_updates.py", line 110, in <module>
main()
File "/usr/local/lib/python3.6/site-packages/gooey/python_bindings/gooey_decorator.py", line 83, in inner2
return payload(*args, **kwargs)
File "dynamic_updates.py", line 53, in main
args = parser.parse_args()
File "/usr/local/lib/python3.6/site-packages/gooey/python_bindings/gooey_parser.py", line 113, in parse_args
return self.parser.parse_args(args, namespace)
File "/usr/local/lib/python3.6/site-packages/gooey/python_bindings/gooey_decorator.py", line 78, in run_gooey
application.run(build_spec)
File "/usr/local/lib/python3.6/site-packages/gooey/gui/application.py", line 15, in run
app = build_app(build_spec)
File "/usr/local/lib/python3.6/site-packages/gooey/gui/application.py", line 24, in build_app
gapp = GooeyApplication(merge(build_spec, imagesPaths))
File "/usr/local/lib/python3.6/site-packages/gooey/gui/containers/application.py", line 65, in __init__
self.fetchExternalUpdates()
File "/usr/local/lib/python3.6/site-packages/gooey/gui/containers/application.py", line 150, in fetchExternalUpdates
self.buildSpec['encoding']
File "/usr/local/lib/python3.6/site-packages/gooey/gui/seeder.py", line 15, in fetchDynamicProperties
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: "'/usr/local/opt/python3/bin/python3.6' -u 'dynamic_updates.py' gooey-seed-ui --ignore-gooey": "'/usr/local/opt/python3/bin/python3.6' -u 'dynamic_updates.py' gooey-seed-ui --ignore-gooey"
Python 2
Traceback (most recent call last):
File "dynamic_updates.py", line 108, in <module>
main()
File "/Library/Python/2.7/site-packages/gooey/python_bindings/gooey_decorator.py", line 83, in inner2
return payload(*args, **kwargs)
File "dynamic_updates.py", line 53, in main
args = parser.parse_args()
File "/Library/Python/2.7/site-packages/gooey/python_bindings/gooey_parser.py", line 113, in parse_args
return self.parser.parse_args(args, namespace)
File "/Library/Python/2.7/site-packages/gooey/python_bindings/gooey_decorator.py", line 78, in run_gooey
application.run(build_spec)
File "/Library/Python/2.7/site-packages/gooey/gui/application.py", line 15, in run
app = build_app(build_spec)
File "/Library/Python/2.7/site-packages/gooey/gui/application.py", line 24, in build_app
gapp = GooeyApplication(merge(build_spec, imagesPaths))
File "/Library/Python/2.7/site-packages/gooey/gui/containers/application.py", line 65, in __init__
self.fetchExternalUpdates()
File "/Library/Python/2.7/site-packages/gooey/gui/containers/application.py", line 150, in fetchExternalUpdates
self.buildSpec['encoding']
File "/Library/Python/2.7/site-packages/gooey/gui/seeder.py", line 15, in fetchDynamicProperties
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I'm getting the following errors when I run simple_demo.py
import simple_demo.py
Traceback (most recent call last):
File "", line 1, in
File "simple_demo.py", line 7, in
from gooey import Gooey, GooeyParser
File "gooey/init.py", line 2, in
from gooey.python_bindings.gooey_decorator import Gooey
File "gooey/python_bindings/gooey_decorator.py", line 14, in
from gooey.gui import application
File "gooey/gui/application.py", line 5, in
import wx
ImportError: No module named wx
Any recommendations?
GooeyExamples/examples/subparser_demo.py
Line 63 in c6060f7
I have tested the Subparser demo you have on your example,
parser.parse_args()
Problem is it cannot parse any data from the second tab, can only get the first tab data only.
Have tried several way and could not find any way to achieve to run without any problem
Running examples/simple_demo.py:
python simple_demo.py
Traceback (most recent call last):
File "simple_demo.py", line 28, in <module>
main()
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/python_bindings/gooey_decorator.py", line 71, in inner2
return payload(*args, **kwargs)
File "simple_demo.py", line 24, in main
args = parser.parse_args()
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/python_bindings/gooey_parser.py", line 59, in parse_args
return self.parser.parse_args(args, namespace)
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/python_bindings/gooey_decorator.py", line 66, in run_gooey
application.run(build_spec)
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/gui/application.py", line 19, in run
controller = Controller(build_spec)
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/gui/controller.py", line 10, in __init__
self.view = BaseWindow(layout_type=self.model.layout_type)
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/gui/windows/base_window.py", line 42, in __init__
self._init_components()
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/gui/windows/base_window.py", line 110, in _init_components
self.head_panel = header.FrameHeader(parent=self)
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/gui/windows/header.py", line 29, in __init__
self._init_components()
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/gui/windows/header.py", line 54, in _init_components
self._header = wx_util.h1(self, '')
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/gui/util/wx_util.py", line 26, in h1
return _header(parent, label, (wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False))
File "/usr/lib/python2.7/site-packages/Gooey-0.9.2.5-py2.7.egg/gooey/gui/util/wx_util.py", line 34, in _header
font = wx.Font(font_size * 1.2, *styles)
TypeError: Font(): arguments did not match any overloaded call:
overload 1: too many arguments
overload 2: argument 1 has unexpected type 'float'
overload 3: argument 1 has unexpected type 'float'
overload 4: argument 3 has unexpected type 'FontWeight'
overload 5: argument 1 has unexpected type 'float'
overload 6: argument 1 has unexpected type 'float'
overload 7: argument 1 has unexpected type 'float'
Issue in the following python Script: https://github.com/chriskiehl/GooeyExamples/blob/master/examples/subparser_demo.py
parser = GooeyParser(description=settings_msg)
parser.add_argument('--verbose', help='be verbose', dest='verbose',
action='store_true', default=False)
subs = parser.add_subparsers(help='commands', dest='command')
--verbose arguments is not visible on output screen. What can we do for making it visible on GUI?
Traceback (most recent call last):
File "GooeyExamples\examples\example_progress_bar_1.py", line 11, in <module>
@Gooey(progress_regex=r"^progress: (\d+)%$")
TypeError: Gooey() got an unexpected keyword argument 'progress_regex'
@ line 33:
Traceback (most recent call last):
File "subparser_demo.py", line 95, in <module>
main()
File "/usr/lib/python3.8/site-packages/gooey/python_bindings/gooey_decorator.py", line 87, in inner2
return payload(*args, **kwargs)
File "subparser_demo.py", line 33, in main
curl_parser.add_argument('--dump-header', type=argparse.FileType,
File "/usr/lib/python3.8/site-packages/gooey/python_bindings/gooey_parser.py", line 88, in add_argument
self.parser.add_argument(*args, **kwargs)
File "/usr/lib/python3.8/argparse.py", line 1376, in add_argument
raise ValueError('%r is a FileType class object, instance of it'
ValueError: <class 'argparse.FileType'> is a FileType class object, instance of it must be passed
The line is:
curl_parser.add_argument('--dump-header', type=argparse.FileType,
help='Write the protocol headers to the specified file')
Ditto for similar line 64.
OS: Linux (Manjaro 18.1.4)
Python version: 3.8.0
Gooey version: 1.0.3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.