Python wrapper for zenity.
Project description
zenity_judo
Python wrapper for zenity.
From the zenity manpage:
zenity is a program that will display GTK+ dialogs, and return (either in the return code, or on standard output) the users input. This allows you to present information, and ask for information from the user, from all manner of shell scripts.
For example, zenity --question will return either 0, 1 or 5, depending on whether the user pressed OK, Cancel or timeout has been reached. zenity --entry will output on standard output what the user typed into the text entry field.
Examples:
Show a message:
from zenity import Info
dlg = Info(text = 'This is the message text', title = 'Some info')
dlg.show()
Ask a question:
dlg = Question(text = 'Are you really <b>sure</b> you want to do that?',
ok_label = 'Sure', cancel_label = 'No, not ever')
if dlg.show():
print('Okay, you asked for it!')
(The above example illustrates the use of "Pango" markup. See: https://docs.gtk.org/Pango/pango_markup.html)
Choose one out of a list:
dlg = List(['Tom', 'Dick', 'Harry'])
res = dlg.show()
if res:
print(f'Sending this off to {res} ...')
Pick a color:
dlg = Color_Selection(color = "#00FF00")
res = dlg.show()
if res:
print(f'Color me {res}')
Limitations
As of this moment, the "Progress" class is not finished. If you would like to contribute a solution, feel free to make a pull request!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zenity_judo-1.0.2.tar.gz.
File metadata
- Download URL: zenity_judo-1.0.2.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2eb3eae561802d7ba843b9e00970494faf534c31672e7a4573ed155ad6b3cc49
|
|
| MD5 |
ad9efa53599d34914070e7bc2fd948e8
|
|
| BLAKE2b-256 |
c0f43b25dbd70b6b8a9aa737f5e4a3bc72095db3aad97580b71f95e0dd71beee
|
File details
Details for the file zenity_judo-1.0.2-py2.py3-none-any.whl.
File metadata
- Download URL: zenity_judo-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
545d4df03727c06ca15535a5bb5aeac5f9c4bc6b6ff3c5b0baaddc96abf407aa
|
|
| MD5 |
4e0774786650489076189d569f1fdae8
|
|
| BLAKE2b-256 |
b4ef1ab1943ce0421bb1b77598f918cc91ca183a278fd69c25ccabd5d348a22b
|