[Zconfig] Modify, write to file, convert to/from dict your ZConfig objects

Nicola Larosa nico at tekNico.net
Mon Mar 7 17:43:46 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

After last december's first try, here I am, at it again. :-)

There are a number of use cases where the config values have to be
modified, and the resulting config has to be saved to file. In addition,
it is sometimes convenient to convert the hierarchy of objects
representing the config, to and from a hierarchy of nested dictionaries.
(For instance, it is useful when sending configs over Twisted's
Perspective Broker remote call protocol, which has rather stringent
security checks about what object types may be transferred over it.)

This extension implements such functionality by adding, at runtime, five
methods, one function and one class to the imported ZConfig modules and
classes, avoiding changes to the ZConfig source code. Just do an "import
zcfg_addon" right after "import ZConfig", and you're all set.

It has been used on several systems for a few weeks now, and a few
wrinkles have been ironed out. There's a minimal test for each method or
function, and Epydoc-generated API docs for most things.

I would like to know whether anybody finds this useful, or has any idea
on how to make it better. I put it under a MIT license, and it goes
without saying that I would be very pleased if it would be considered for
inclusion in ZConfig, in any shape of form, part or whole.

I attach the archive to this email, Mailman will intercept it, just
rename it back to zcfg_addon-0.2.tar.gz and it will work just fine.

- --
Nicola Larosa - nico at tekNico.net

Somebody has to go first, and be willing to accept the consequences.
To dream the impossible dream, because it's only impossible so long
as everybody still thinks they're the only one who has that dream.
 -- Phillip J. Eby, dirtSimple.org, January 2005

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCLNkgXv0hgDImBm4RAmhzAJ9sz6Giz17fHW5koQNF+S8ky2XYWACgrqxE
mqQbnm+zosJ7XqsFlDufvTY=
=B/Ni
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zcfg_addon-0.2.tar.gz
Type: application/gzip
Size: 16292 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zconfig/attachments/20050307/993bd1f4/zcfg_addon-0.2.tar.bin


More information about the ZConfig mailing list