Please disable your adblock and script blockers to view this page

chriskiehl/Gooey


Python
GUI
CLI
GitHub Desktop
Console Program
ArgumentParser
Console Applications
WX
GooeyParser
ISO
UI.Gooey
Console Programs
@Gooey
AboutBox
SchemaExample
MessageDialog
API
ExampleWith
Configuration
JSON
True).Regex
Processing ExpressionProgram
examples!Gooey
hide_time_remaining_on_complete
progress_regex
tl;dr


Use Git
GooeyParserGooey
DownloadGooey
Python


Edit



TextField


UI
Progress Bar

No matching tags

No matching tags

Positivity     37.00%   
   Negativity   63.00%
The New York Times
SOURCE: https://github.com/chriskiehl/Gooey
Write a review: Hacker News
Summary

Unfortunately, this cannot be done as part of the pip installation and should be manually downloaded from the wxPython website.Gooey is attached to your code via a simple decorator on whichever method has your argparse declarations (usually main).Different styling and functionality can be configured by passing arguments into the decorator.See: How does it Work section for details on each option.Gooey will do its best to choose sensible widget defaults to display in the GUI. It lets you build as complex of an application as your heart desires all while getting the GUI side for free.Gooey is attached to your code via a simple decorator on whichever method has your argparse declarations.At run-time, it parses your Python script for all references to ArgumentParser. However, by dropping in GooeyParser and supplying a widget name, you can display a much more user friendly FileChooserCustom Widgets:Please note that for both of these widgets the values passed to the application will always be in ISO format while localized values may appear in some parts of the GUI depending on end-user settings.Gooey is international ready and easily ported to your host language. Submit a pull request!Just about everything in Gooey's overall look and feel can be customized by passing arguments to the decorator.You can achieve fairly flexible layouts with Gooey by using a few simple customizations.At the highest level, you have several overall layout options controllable via various arguments to the Gooey decorator.Grouping InputsBy default, if you're using Argparse with Gooey, your inputs will be split into two buckets: positional and optional. You can arbitrarily bucket inputs into logic groups and customize the layout of each.With argparse this is done via add_argument_group()You can add arguments to the group as normalWhich will display them as part of the group within the UI.Gooey has a handful of presentation modes so you can tailor its layout to your content type and user's level or experience.The default view is the "full" or "advanced" configuration screen. So, if you want to trigger the Column Layout, you'll need to add a subparser to your argparse code.It can be toggled via the advanced parameter in the Gooey decorator.The basic view is best for times when the user is familiar with Console Applications, but you still want to present something a little more polished than a simple terminal. This allows Gooey to show much, much more user friendly feedback before it hands control off to your program.Writing a validator:Validators are specified as part of the gooey_options map available to GooeyParser. This can be used to, for instance, show the result of a previous execution on the config screen without requiring that the user restart the program.How does it work?At runtime, whenever the user hits the Configuration screen, Gooey will call your program with a single CLI argument: gooey-seed-ui. So, in response to the gooey-seed-ui request, you would return a JSON string with --load as the key, and a list of strings that you'd like to display to the user as the value.

As said here by chriskiehl