From: Florent R. <f.r...@fr...> - 2013-08-20 12:03:09
|
Dear users, I am pleased to announce the releases of pythondialog 2.12 and 2.13 (yes, like Halley's Comet). In order to avoid confusion like there has been in the past, and thanks to the prompt cooperation of Peter Åstrand, I am now maintaining pythondialog at SourceForge, at the same place where the old 1.0 and 2.7 releases were uploaded. The new releases add Python 3 support, a few improvements (actually, many improvements if you didn't upgrade after version 2.7), and close all SourceForge bugs. Moreover, you can now follow pythondialog's development with its git repository[1] and easily compare[2] between /any/ version ever released, as I incorporated all history back to version 1.0 in this git repository. [1] http://sourceforge.net/p/pythondialog/code/ [2] git clone git://git.code.sf.net/p/pythondialog/code pythondialog cd pythondialog # and then for instance: git diff v2.12 v2.13 I also revamped the website[3]. Please tell me if you find any error. I hope it looks nicer this way. Additionally, it is now up-to-date and contains a "Screenshots" page with a picture of every widget supported in pythondialog, so that you can quickly and easily see what is available and how it looks like. [3] http://pythondialog.sourceforge.net/ If you want to read about the main changes in versions 2.12 and 2.13, you can find them right there on the main page. Alternatively, I've copy/pasted a plain text rendering of these changes below for your convenience. Finally, a quick link to the download page for the impatient: <http://sourceforge.net/projects/pythondialog/files/pythondialog/> Ah, err... this reminds me that the PyPI[4] entry for pythondialog is still referencing and distributing version 2.7 only, effectively hiding all subsequent versions for many users, thanks to our dear friend "paulproteus" who had the brilliant idea of opening this PyPI entry under his own account. For this reason, none of the past or present pythondialog maintainers can update this page! I have tried to contact him about this (with a Google search for the email address, since PyPI doesn't give any), with no luck so far. Ugh. If anyone of you know him, please get in touch with him. Next step is to file a support request at PyPI. [4] https://pypi.python.org/pypi/pythondialog/ ----------------------------------- Main changes in the latest releases ----------------------------------- [ What follows is a plain text dump of <http://pythondialog.sourceforge.net/index.html#news>. For more detailed changes, please refer to the ChangeLog file in a release tarball or use "git log" from the git repository (you can also read the same log online at the address [1] mentioned above, after following the "History" link). ] In short, the latest versions (2.12 and 2.13) only support Python 3; users who really want to stick to Python 2 should use version 2.11 for now. The naming of each tarball clearly indicates which major version of Python it has been prepared for. Main changes in version 2.13 **************************** The main changes in version 2.13 are: * a new set_background_title() method (replacing the long-obsolete setBackgroundTitle() from pythondialog 1.0) that does proper "dash escaping"[5]; * documentation improvements for the Dialog class. [5] This could be useful if you (somewhat strangely) chose a backtitle that starts with a double dash ("--"). Without dash escaping, it might be mistaken for a dialog option. Main changes in version 2.12 **************************** The main changes in version 2.12 are: * Python 3 support. You can (and should) now pass "normal" strings to pythondialog calls, which correspond to Unicode strings in Python 2-speak. Python will automatically encode the arguments according to the current locale when calling dialog. pythondialog-based scripts can be written in any encoding (using an encoding declaration if the encoding is not UTF-8), and everything will be automatically recoded according to the user's locale when he runs the script. Of course, if the script tries to display a character that can't be represented in the user's locale, there is a problem. For instance, the "Y" (LATIN CAPITAL LETTER Y WITH DIAERESIS) and euro sign don't exist in ISO 8859-1, therefore if the terminal is running under a locale based on ISO 8859-1, it can't display any of these characters and there is nothing that pythondialog can do about that. However, if using only characters that can be represented in the user's locale, there is no problem and everything is automatically translated between the encoding of the Python script and the encoding defined by the user's locale. In particular, this last condition is almost always satisfied when the user's locale is based on Unicode, since this character set can represent just about anything that can be found in the myriad of legacy character sets. * Proper escaping of user-supplied values in case they start with two dashes ("--"). Such strings could be confused with dialog options in previous versions, since pythondialog didn't do any such escaping before version 2.12. * Much easier debugging, with Dialog.setup_debug(), its optional use in the demo and the new traceback handling thanks to the traceback module (see the documentation, history link on the git repository, or ChangeLog file in a release tarball for details). In case there is a problem with the demo, or if you just want to look under the hood, you can now run it with --debug (and optionally --debug-file) to make it write the full dialog command lines to a file. * Standard exception behavior: if e is a dialog.error instance (or an instance of a dialog.error subclass), then str(e) returns nothing more than the exception message, as with all Python built-in exceptions. No need to write e.complete_message() anymore. * Support for many "common options" has been added: --ascii-lines, --colors, --column-separator, --date-format, --exit-label, --extra-button, --extra-label, --hfile, --hline, --keep-tite, --keep-window, --no-collapse, --no-lines, --no-mouse, --no-nl-expand, --no-ok, --scrollbar, --time-format, --trace and --visit-items. The new method Dialog.maxsize() allows one to find the terminal size and know how many lines and columns are available for a dialog box. * The pythondialog version is now accessible as dialog.__version__ (attribute of the dialog module), as per Python standards; additionally, the version of the dialog backend in use can be obtained with Dialog.backend_version() (method of Dialog instances). * Transition from PythonDialogIOError to PythonDialogOSError. As you may be aware of, the exception hierarchy has been reworked in Python 3.3, and from this version onwards, IOError is an alias of OSError. In this context, it would be nice to get rid of PythonDialogIOError in favor of PythonDialogOSError. pythondialog 2.12 prepares this transition in the following way. PythonDialogIOError is now a subclass of PythonDialogOSError so that users can safely replace "except PythonDialogIOError" clauses with "except PythonDialogOSError" even if running under Python < 3.3. pythondialog will raise PythonDialogOSError instead of PythonDialogIOError when Python stops distinguishing between IOError and OSError, i.e. when running under Python 3.3 or later. -- Florent |