Author: | Michael Foord |
---|---|
Contact: | fuzzyman@voidspace.org.uk |
Version: | 0.2.5 |
Date: | 2005/12/16 |
License: | BSD License [1] |
Online Version: | Pythonutils Homepage |
Support: | Mailing List |
The Voidspace Pythonutils package is a simple way of installing the Voidspace collection of modules [2]. These are currently :
- ConfigObj 4.1.0 - Easy config file reading/writing
- validate 0.2.1 - Validation and type conversion system
- listquote 1.4.0 - String to list conversion
- StandOut 2.1.0 - Simple logging and output control object
- pathutils 0.2.4 - For working with paths and files
- cgiutils 0.3.5 - CGI helpers
- urlpath 0.1.0 - Functions for handling URLs
- odict 0.2.1 - Ordered Dictionary Class
Several of the Voidspace Projects depend on these modules. They are also useful in their own right of course. They are primarily general utility modules that simplify common programming tasks in Python.
All the modules are intended to be compatible with Python 2.2 or more recent.
ConfigObj is the biggest module in the Voidspace Pythonutils package. It offers an extremely simple interface to reading and writing config files, and has a vast array of additional features. The latest update, to version 4, has changed ConfigObj and validate a great deal. This may affect your code - see the ConfigObj documentation for details.
Note
These modules are maintained separately. You can sometimes get more recent versions from the Voidspace Modules or Recipebook pages.
Pythonutils is a pure python package. This means you don't need to use the windows installer, it's just convenient for installing and un-installing.
Many of the modules are also available individually from the Voidspace Modules page or the Voidspace Python Recipebook.
You can also see Epydoc generated API Documentation for ConfigObj and validate.
Each module has their own page of documentation. This documentation comes bundled in the source package.
This means that you can use any of the following commands (or similar) to import from the Voidspace modules :
If any of these commands fail, check that the '.pth' file is in an appropriate location. I reccommend using the from configobj import ConfigObj type imports, as these work with the individual modules.
The exception are cgiutils and validate. These aren't imported into the pythonutils namespace because they are less commonly used. You can still do import cgiutils and import pythonutils.cgiutils, but from pythonutils import * doesn't import their names.
Caution!
I've had a report that on some distributions of Python 2.4 the '.pth' file is being put in a place where it's not being accessed. When I find a solution I'll make a fix and/or let you know.
You can manually add a pythonutils.pth file in your site-packages folder, with a single line pointing to the location of the pythonutils directory.
All the modules in Pythontuils are intended to be compatible with Python 2.2
and more recent. Some of the modules (configobj and validate for example) have
been tested extensively for compatibility with Python 2.2 - some of the other
modules have been tested less rigorously .
If you have any problems (or discover any other bugs) then email me (on fuzzyman@voidspace.org.uk)and I'll resolve the problems (or fix the bug).
These are in no particular order. This is the TODO for the module collection. Each of the individual modules has their own TODO section.
Again, this is a CHANGELOG for the Pythonutils package. Each module will have it's own CHANGELOG.
Updated the following modules :
Corrected MANIFEST path separator to /. This allows distutils commands like bdist_rpm to work correctly.
Updated to ConfigObj 4.0.1 and cgiutils 0.3.4
Updated to ConfigObj 4.0.0 beta 5
This contains bugfixes to ConfigObj.
Updated to odict 0.1.2 with various improvements and optimisations.
Refactored and redocumented.
Major update to ConfigObj and validate.
Removed caseless, and added odict and urlpath.
Updated several of the modules.
Thanks to Par Pandit for bugfix to listquote.py
Packaged several of the Voidspace Pythonutils modules together.
These files are licensed under the BSD license. This is a very unrestrictive
license - but it comes with the usual disclaimer. This is free software - test
it, break it, just don't blame me if it eats your data ! (If it does though,
let me know, and I'll fix that it so it doesn't happen to anyone else
Copyright (c) 2004-2005, Michael Foord All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Michael Foord nor the name of Voidspace may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You should also be able to find a copy of this license at : BSD License
Note that the individual modules may be the work of more than one author. See the indiviudal documentation pages for details of contributors.
Particular thanks goes to Nicola Larosa for his help with ConfigObj and setting up the Voidspace server.
Contributions, suggestions, and bugfixes are welcome. Also welcomed are donations to help cover the hosting and delivery costs of pythonutils.
[1] | Online at http://www.voidspace.org.uk/python/license.shtml |
[2] | Well, the common ones anyway. You will see more modules at Voidspace Modules that aren't included. |
[3] | Online at http://www.voidspace.org.uk/python/configobj.html |
[4] | Online at http://www.voidspace.org.uk/python/validate.html |
[5] | Online at http://www.voidspace.org.uk/python/listquote.html |
[6] | Online at http://www.voidspace.org.uk/python/standout.html |
[7] | Online at http://www.voidspace.org.uk/python/pathutils.html |
[8] | Online at http://www.voidspace.org.uk/python/cgiutils.html |
[9] | Online at http://www.voidspace.org.uk/python/urlpath.html |
[10] | Online at http://www.voidspace.org.uk/python/odict.html |
Note
Rendering this document with docutils also needs the textmacros module and the PySrc CSS stuff. See http://www.voidspace.org.uk/python/firedrop2/textmacros.shtml