Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [Announce] Gnosis Utils 1.2.0

Thread Tools

[Announce] Gnosis Utils 1.2.0

David Mertz, Ph.D.
Posts: n/a
David Mertz ((E-Mail Removed))
Frank McIngvale ((E-Mail Removed))

This release of the Gnosis Utilities contains several new modules,
as well as fixes, enhancements, and speedups in existing

Try it out, have fun, send feedback!


ADDED gnosis.utils.hashcash (also runs standalone). Python
implementation of Hashcash v.1 (backward compatible with hashcash

ADDED disthelper. A collection of scripts and modules that are
generally useful for building/maintaining a Python source

- To use disthelper in your own distribution, copy the entire
disthelper/ tree into the toplevel of your tree, as has been done
in Gnosis_Utils.
- See disthelper/README for details.

ADDED gnosis.pyconfig. Detect actual capabilities available in a
Python interpreter. gnosis.pyconfig lets you write much more
robust/readable code than simply relying on sys.version_info.

ADDED gnosis.xml.xmlmap. Unicode->XML legality testing & Unicode
helper functions.

- For detailed background information on the motivation for
this module, see "All About Python and Unicode" at:


There is one critical change in gnosis.xml.pickle; all xml.pickle
users are encouraged to upgrade.

Catch unpickleable data in gnosis.xml.pickle and abort, instead of
creating pickles that can't be reloaded.

- Recommend all xml.pickle users upgrade to 1.2.0.
- Issues: not all valid Unicode strings are valid XML CDATA or
attribute values.
- There have not been any reports of data loss due to this, but it
is a possibility with 1.1.1.
- A future Gnosis release will fix this so that the 'bad' data can
be pickled, instead of just bailing out.

Numerous new convenience functions for gnosis.xml.objectify. See
gnosis/docs/xml_matters_39.txt for more discussion.

- addChild() # moved to utils subpackage
- walk_xo() # Recursively traverse the nodes
- write_xml() # Serialize an _XO_ object back into XML
- XPath() # Find node(s) within an _XO_ object
- pyobj_printer() # moved to utils subpackage

Some of older conveniences have been tweaked and/or were not announced

- content() # The (mixed) content of o as a list
- children() # The child nodes (not PCDATA) of o
- text() # List of textual children
- dumps(): # The PCDATA in o (preserves whitespace)
- normalize() # Whitespace normalize string,
# e.g. o.PCDATA==normalize(dumps(o))
- tagname() # The element tag o was generated from
- attributes()# List of (XML) attributes of o

Fixed two bugs causing leaks in long running gnosis.xml.objectify
processes (file close and expat base class).

Significant speedups by miscellaneous refactoring/cleanup in

Fixes to gnosis.xml.indexer suggested by Uche Ogbuju.

Security fixes to gnosis.utils.convert.dmText2Html.


Browse the latest development snapshot or download it using 'wget -r'
or similar tools:

It may be obtained at:

The current release is always available as:

Other distribution formats and older versions can be found at:


Gnosis Utilities contains a number of Python libraries, most (but not
all) related to working with XML. These include:

disthelper (Create more flexible distutils archives)
gnosis.indexer (Full-text indexing/searching)
gnosis.xml.pickle (XML pickling of Python objects)
gnosis.xml.objectify (Any XML to "native" Python objects)
gnosis.xml.validity (Enforce validity constraints)
gnosis.xml.relax (Tools for working with RelaxNG)
gnosis.xml.indexer (XPATH indexing of XML documents)
[...].convert.txt2html (Convert ASCII source files to HTML)
gnosis.util.dtd2sql (DTD -> SQL 'CREATE TABLE' statements)
gnosis.util.sql2dtd (SQL query -> DTD for query results)
gnosis.util.xml2sql (XML -> SQL 'INSERT INTO' statements)
gnosis.util.combinators (Combinatorial higher-order functions)
gnosis.util.introspect (Introspect Python objects)
gnosis.utils.hashcash (Hashcash proof-of-work protocol)
gnosis.magic (Multimethods, metaclasses, etc)
gnosis.trigramlib (Work w/ trigrams, e.g. spam filtering)
gnosis.pyconfig (Capability-based version adaptation)

....and so much more!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dev-utils gem... How do I require_gem 'dev-utils/debug' ? Eirikur Hallgrimsson Ruby 3 10-10-2004 07:47 AM
in using ADS 1.2, does utils.h = Utils.h for example ... in windows XP arm developer C++ 0 06-03-2004 02:33 AM
[Announce] Gnosis Utils 1.1.1 David Mertz, Ph.D. Python 0 02-19-2004 05:40 AM
[Announce] Gnosis Utils 1.1.0 (update) David Mertz, Ph.D. Python 0 07-16-2003 09:22 PM
[Announce] Gnosis Utils 1.1.0 (update) Lulu of the Lotus-Eaters Python 0 07-16-2003 09:18 PM