"Brendan" <[EMAIL PROTECTED]> writes:

> seems risky.  Also my config files have (a tiny bit of) nested
> structure, such as:
> 
> Model1(
>    numBumps = 1
>    sizeOfBumps = 2
>    transversePlanes = [
>         Plane(type=3, z=4),
>         Plane(type=5, z=6),
>         Plane(type=3, z=8)
>     ]
> )
> 
> which I'm not sure the .ini format can easily support.  I could use
> (key buzzword voice) XML, but  I fear that might send me down the
> 'overcomplicating things' path.  Your suggestion has given me some new
> places to search Google (configparser, python config files), so I'll
> look around for better ideas.

Take a look at pickle (specially cPickle) module for pickling and unpickling
data directly from / to Python types.  What you want can be mapped to
dictionaries of lists of dictionaries. :-)

-- 
Jorge Godoy      <[EMAIL PROTECTED]>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to