what is it ---------- A Python package to parse and build CSS Cascading Style Sheets. (Not a renderer though!) release ------- 0.9.5 had been in development for about half a year and this is the first *final* release for quite some time now - actually the last has been 0.6 ... It is nevertheless definitely not perfect but tests have been expanded, included scripts should all work and all examples on the website have been checked. 0.9.6 will start soon ... main changes ------------ 0.9.5 080730 - **API CHANGE**: If a new medium is trying to be appended to a ``MediaList`` already set to ``all`` an ``xml.dom.InvalidModificationErr`` is raised. The exception to this handling is adding ``handheld`` which is a special case for Opera and kept for now. This special handling may be removed in the future. A ``WARNING`` is logged in any case. - **BUGFIX**: Fixed reference error in @import rule preventing change of the used ``MediaList``. - **BUGFIX**: Deeply nested ``CSSImportRule``\ s with different encodings should keep the encoding as defined (via HTTP, parendSheet, @charset etc) now. Therefor ``cssutils.util._readUrl`` does return ``(encoding, enctype, decodedCssText)`` now where ``enctype`` is a number from 0 to 5 indicating which encoding type was used: 0 for encoding override, 1 for HTTP encoding, 2 for BOM or @charset rule, (3 is unused currently), 4 for encoding of the parent sheet and 5 if encoding defaults to UTF-8 as no other information is available. (This may later be done as constants but this function should not be used from programs generally). - **BUGFIX**: Replaced usage of ``WindowsError`` with ``OSError``. I (naively ;) thought ``WindowsError`` at least be present in environments other than Windows but it just results in a ``NameError``... The part of the API which triggered this Exception is an @import rule with an invalid or local (file) URI so should have happened quite rarely anyway. + IMPROVEMENT: Standalone scripts ``csscombine`` and ``csscapture`` are available for programmatic use in ``cssutils.script.csscombine`` and ``cssutils.script.CSSCapture`` res. + IMPROVEMENT: ``cssutils.script.csscombine`` and ``csscombine`` script do use the cssutils log now instead of just writing messages to ``sys.stderr`` + IMPROVEMENT: Optimized and refactored tokenizer (CHARSET_SYM). Note: CSSValue, CSSValueList, and CSSPrimitiveValue and the relevant methods/properties Property.cssValue and CSSStyleDeclaration.getPropertyCSSValue are more or less DEPRECATED and will probably be replaced with interfaces defined in CSSOM. For now use the properties and methods that handle values as simple strings, e.g. ``Property.value``. As the aforementioned classes are not hardly that useful anyway this should not be a big problem but please beware if you use or have used them. If you think this a bad idea please let me know! license ------- cssutils is published under the LGPL version 3 or later, see http://cthedot.de/cssutils/ If you have other licensing needs please let me know. download -------- For download options see http://cthedot.de/cssutils/ cssutils needs Python 2.4 or higher (tested with Python 2.5.2 on Vista only) Bug reports (via Google code), comments, etc are very much appreciated! Thanks. Christof
participants (1)
-
Christof Hoeke