PyZenity
PyZenity is an easy to use interface to Zenity for Python. Zenity is normally called from scripts by invoking it with a multitude of command line parameters that it uses to construct its interfaces. This module hides the details of invoking the command and presents simple API functions like:
cancel = Question('Should I cancel the operation?')
Why PyZenity?
Well I originally wrote PyZenity a few years ago when I decided I wanted to learn how to use the new (in Python 2.4) subprocess module. Now I needed a command that I could use to experiment with and I thought, “hey, what better program then Zenity.” It takes lots of parameters, has well defined return values, and I could experiment right from the interactive shell because it spawned a GUI. So I wrote functions to call Zenity’s widgets and played around for a bit exercising some of the features of subprocess. When I was done I thought, “Maybe someone would be interested in this”, so I documented it and threw it up on my website. Lo and behold, a few people were and I occasionally get bug fixes for it.
Others have noted that the proper thing to do is use PyGTK to create interactive GUIs and I totally agree. But if your interest is in creating quick scripts to get the job done, PyZenity is much easier to use.
Download
The current version is 0.1.4.
- PyZenity-0.1.4.tar.gz - md5sum: 7076efdd2093ceb1859c1bf24c6033cc
- PyZenity-0.1.3.tar.gz - md5sum: ce2d48c5e17bf50ff110f6a08fa327e2
- PyZenity-0.1.2.tar.gz - md5sum: 3b5a724738d2bfd6b1ed084eaab6fe09
- PyZenity-0.1.1.tar.gz - md5sum: f25d8e33c3efbafe7a99780e0c7603a7
- PyZenity-0.1.tar.gz - md5sum: 8ed62a9222774b0bc04c21f351e19a5c
Documentation
The documentation is available here.
Release Notes
- Version 0.1.4 - Dietmar Thaler fixed a ValueError bug in PyZenity.List when using the boolstyle parameter.
- Version 0.1.3 - The PKG-INFO file says PyZenity is under the BSD License but it’s actually under the MIT License. Thanks to Siegfried-Angel for pointing that out!
- Version 0.1.2 - Felix Hummel found and fixed an ImportError when using the GetDirectory function caused by a failure to import os.path.
- Version 0.1.1 - Fixed a bug with the GetDate function not taking into account locale while parsing the return from zenity. Thanks to Matt Williams for finding the bug.
- Version 0.1 - Initial version.