Skip to main content
Rapidly create GUI without any knowledge of wxpython
=============================================
jerryzhujian9_at_gmail.com
Tested under python 2.7
To see your python version
in terminal: python -V
or in python: import sys; print (sys.version)

inspired by gui2py, easygui
=============================================
Install:
1) Requires wxPython 2.9.2.4 (tested under canopy)
2) or you can install it first manually from
http://sourceforge.net/projects/wxpython/files/wxPython/2.9.2.4/
Then https://pypi.python.org/pypi/quickgui
pip install quickgui
method 1&2 run: python myscript.py is fine
3) For anacoda python (wxPython 3.0 tested)
but remember to run: pythonw myscript.py instead of python myscript.py

Usage:
import quickgui as q

Message(msg, seconds=10), message
Displays a timed modal message box, timeout and cancel returns 0, ok returns 1
XPrinter()
Display a window to capture print output
if on, both terminal and window (updating gui will greatly increase script execution time)
if off, only terminal

Methods: on/off

Examples:
xprinter = XPrinter()
xprinter.on()
print 'will be shown on window'
xprinter.off()
print 'will be shown in terminal'
xprinter.on()
print 'on window again'

for x in range(100):
print "I am a line of " + str(x)
# time.sleep(0.01)

alert, confirm, getfile, setfile, getdir, inputs
Alert(message, title="", icon="exclamation")
# Shows a simple pop-up modal dialog.
# icon = "exclamation", "error", "question", "info"
Confirm(message="", title="", default=False, ok=False, cancel=False)
# Asks for confirmation (yes/no or ok and cancel), returns True or False or None.
# show yes/no by default
# default sets the default button
# ok shows OK; cancel shows Cancel

GetFile(directory='', filename='', multiple=False, wildcard='All Files (*.*)|*.*', title="Select file(s)")
# Shows a dialog to select files to open, return path(s) if accepted.
# wildcard format: 'BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif'
'Pictures (*.jpeg,*.png)|*.jpeg;*.png
SetFile(directory='', filename='', overwrite=False, wildcard='All Files (*.*)|*.*', title="Save"):
# Shows a dialog to select file to save, return path(s) if accepted.
# overwrite seems not work?
GetDir(path="", title='Select a directory')
# Shows a dialog to choose a directory.

values = Inputs(items=[], width=None, instruction='Click the button to read the help.', title='Ask for inputs')
# Flexible dialog for user inputs.
# Returns a value for each row in a list, e.g. [u'1001', u'female', u'', []]
# textbox accepts a string or str(default) and returns a string or eval(string)
# checkbox returns a bool
# radiobox returns a string or ''
# combobox returns a string or ''
# listbox returns a list of strings or []
# If cancels, returns None

items = [('ID:', ''),
('ID:', 'siu8505'),
('ID:', 1001),
('IDs:', [1001, 1002]), ->textbox (internally converts data types)
the first element is the label
the second is the default value (e.g. an empty string, number or a list)

('Logical Switch:', 'Checked?', False), ->checkBox (True/False)
('Gender:', ['Female', 'Male'], 0), ->radiobox (0,1; -1 does not work)
('Race:', ['Black', 'White', 'Other'], -1), ->combobox (-1 selects none)
('Majors:
(Can select more than one)',('Psychology','Math','Biology'), 0), ->listbox (multiple)
the first is the label
the second is the options:
a string makes it a checkbox
a list with two elements makes a radiobox
a list with more than two elements makes a combobox
a tuple makes a listbox with multiple choice enabled
the third is the default value (True/False, index of the list or tuple)

(''), ->blank line
just an empty string

({'Selecte Input Directory...': "GetDir()"},''),
({'Selecte Output Directory...': "GetDir()"},''),
({'Save as...': "SetFile()"},''), ->button
({'Selecte Files...': "GetFile(multiple=True)"},[]),->listbox (disabled)
({"Output File Name(*.csv):": "SetFile(directory='%s', filename='output.csv', wildcard='CSV Files (*.csv)|*.csv')" % os.getcwd()}, '')]
the general form is: ({button label: function in a string}, result from function is a str or list)
the first is a dict with the key is the label, the value is the button event function
the second is the type of the returned value from the button function
'' means the button function returns a string
[] means the button fucntion returns a list

values = Inputs(items=items) # returns a list of inputs in the order displayed on the GUI (the insertion of blank line, i.e. ('') in the above example, does not interfere the order of returned values)

Release files for quickgui 1.5.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quickgui 1.5.7
File Size Uploaded
quickgui-1.5.7.tar.gz 12.5 kB Details

Release files / quickgui-1.5.7.tar.gz

Download URL quickgui-1.5.7.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
819ca8d3e6eb76975339d207f13747713711de58bd172950c812a3631735c498
BLAKE2b-256 checksum
How to use checksums
e3f4f5f570228465ab9e9775381ac793a12af2227aaceabd6e90da2067e8ca94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release history Release notifications | RSS feed

This release

1.5.7 This release

1 release file

1.5.6

1 release file

1.5.4

1 release file

1.5.2

1 release file

1.5.1

1 release file

1.5.0

1 release file

1.4.9

1 release file

1.4.8

1 release file

1.4.7

1 release file

1.4.6

1 release file

1.4.5

1 release file

1.4.4

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.9

1 release file

1.3.8

1 release file

1.3.7

1 release file

1.3.6

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.9

1 release file

1.2.8

1 release file

1.2.7

1 release file

1.2.6

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page