From: Florent R. <fl...@vi...> - 2010-03-16 00:10:29
|
[ Cc'ing Adam Cécile because I don't know if he's subscribed here, and it would be nice to have pythondialog updated for squeeze. ] Hello, Well, there has been a long time without any pythondialog release. I guess no bug had to be fixed. :) I am happy to announce version 2.09[1], with enough improvements to warrant an announcement here (see the ChangeLog excerpt at the end of this mail). Basically, every dialog widget is now supported, except for tailboxbg[2]. This is with the dialog version in Debian unstable, i.e. 1.1-20100119. In addition to support for new widgets, I improved the internal function _call_program() and the demo (note: if you ever managed to smile at the previous demo, STAY AWAY FROM THE NEW VERSION: the jokes contained therein are EVEN MORE LETHAL. You've been warned). This means I am resuming work on the project, and taking back ownership... well, so long as I am given back the keys! I updated the metadata in setup.py to have the Trove classifiers and all, but am unfortunately not allowed to upload it to PyPI: % ./setup.py register running register Using PyPI login from /home/flo/.pypirc Server response (403): You are not allowed to store 'pythondialog' package information Grrrr... ----> Peter, would you be so kind to give me ownership on PyPI? Thanks in advance. Similarly with SourceForge, BTW... The new version is available here: http://people.via.ecp.fr/~flo/projects/pythondialog/dist/ with online documentation here: http://people.via.ecp.fr/~flo/2002/pythondialog/pythondialog.html [ The old URLs I used years ago (http://people.via.ecp.fr/~flo/2002/pythondialog/dist/ & Co) are still valid, but I eventually decided to get rid of this silly naming scheme. It may be fine for blog entries or short-term stuff, but not for longer-term projects. ] Future directions ----------------- As I wrote on http://people.via.ecp.fr/~flo/index.en.xhtml#pythondialog: Next things on my TODO list are Python 3 support and properly dealing with Unicode strings. For now, non-ASCII characters are supported if you encode them before passing them to pythondialog (for instance, to UTF-8; of course, the terminal in use must support that encoding). However, I think it would be nice to be able to directly use Unicode strings, but since this area has seen significant changes between Python 2 and Python 3, I don't think it is worth investigating the issue before the port to Python 3. Note to Xdialog users (still anyone out there?) ----------------------------------------------- I didn't include the use_stdout trick for Xdialog compatibility, because my impression is that Xdialog is pretty much dead. It still relies on GTK+ 1.2... and is not in Debian unstable anymore (probably for this very reason). This catering for Xdialog's incompatibilities with dialog is the only pythondialog regression I would expect since version 2.7 (the one on SourceForge). Since I am not sure anyone is still using Xdialog, and since it presents itself as a _drop-in_ replacement for dialog after all, I'd prefer not doing the change if it turns out to be useless. However, in case people are *still* using that, I can put it back: it wasn't that invasive. Changes since version 2.06 -------------------------- 2010-03-14 Florent Rougon <fl...@vi...> * Release 2.09. * dialog.py: new supported widgets: editbox, inputmenu, mixedform, mixedgauge, pause, passwordform, progressbox. * demo.py: general improvements, such as: - hopefully more helpful dialog when the user fails to select a file in fselect; - since actually selecting a file with this widget is already boring after the second time, the widget can be exited by pressing Esc or the Cancel button (in which case the parts of the demo that need the file path will be skipped). - replace a few calls to Dialog.scrollbox() by calls to Dialog.msgbox(), since the latter provides nice automatic line wrapping. * demo.py: support GNU-style option passing with getopt.py; you can use --help to get a list of available options * demo.py: no need to change a global variable anymore to switch the demo to "fast mode", just use --fast * demo.py: add --test-suite mode, mainly for developers: it tests *all* widgets, not only those included in the "default mode", and automatically enables "fast mode". * dialog.py(__call_program): make the function more generic. stdin redirection doesn't involve automatic pipe(2) creation in __call_program() anymore; instead, __call_program expects a file descriptor when it is asked to redirect dialog's stdin (parameter 'redir_child_stdin_from_fd'). The caller may still decide to create a pipe and pass its file descriptor for reading as the 'redir_child_stdin_from_fd' parameter, but the new possibility of redirecting dialog's stdin from an arbitrary file descriptor allows for instance to redirect it from an existing file, network socket... This is used to implement --progressbox cleanly. This change has the additional benefit of simplifying the API, since __call_program()'s return value is always a 2-element tuple now. * dialog.py(__call_program): new close_fds option causing the child process to close the specified file descriptors before the execve(2) system call. This is useful for instance to have the child close an end of a pipe he isn't going to use. Without that, deadlocks could happen because of the child never seeing EOF from the pipe. * dialog.py: use warnings.warn(..., DeprecationWarning) for obsolete functions. * dialog.py: remove convoluted syntax *(<list>,) that was used at several places. I don't see any use for this syntax anymore, and changing it to simply <list> didn't make the universe collapse (so far). * dialog.py: prefix attributes for internal use (such as Dialog._call_program) with a single underscore instead of a double one: we don't need the name mangling here. These underscores in dialog.py are just an indication that the attribute is "internal" and thus subject to API changes, etc. Thanks to Peter Åstrand for pointing this out. * setup.py: - improve the long description, use ReStructuredText - add Trove classifiers - add download_url * Review and update README, TODO... 2010-02-19 Florent Rougon <fl...@vi...> * dialog.py: add support for --dselect * dialog.py: add support for DIALOG_ITEM_HELP * demo.py: small fixes 2009-10-31 Florent Rougon <fl...@vi...> * Released 2.08, skipping version 2.07 to avoid creating confusion with the 2.7 version released by Peter Åstrand in 2004. 2009-02-04 Florent Rougon <fl...@vi...> * Add support for --form. * dialog.py(__call_program): compute the argument list before forking, otherwise things get difficult to understand if this computation raises an exception. Footnotes --------- [1] Yeah, I know very well it is the same as 2.9 (in the most common/sane versioning scheme), but I started this way years ago, and 2.09 / 2.10 / etc. sort much better than 2.9 in lexicographic order, which is always pleasant in a directory listing such as: http://people.via.ecp.fr/~flo/projects/pythondialog/dist/ [2] tailboxbg looks a bit annoying to support because of the --and-widget way of "multiplexing" widgets. -- Florent |