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

Chris McDonough chrism at plope.com
Mon Mar 7 20:22:46 EST 2005


I haven't yet used this, but it's definitely something I've wanted in
the abstract (in order to programmatically change ZConfig files)!  I'm
glad it's out there.

- C


On Mon, 2005-03-07 at 17:43, Nicola Larosa wrote:
> -----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-----
> 
> ______________________________________________________________________
> _______________________________________________
> ZConfig mailing list
> ZConfig at zope.org
> http://mail.zope.org/mailman/listinfo/zconfig



More information about the ZConfig mailing list