Alexandre CONRAD wrote:

> But now, how do I hold multiple servers ? In this case, I thought about
> having multiple sections such as
>
>   [SERVER 01]
>   [SERVER 02]
>   [SERVER 03]
>
> But it's not very efficient when I want to parse the WHOLE config file
> to find which servers are available and retrive their options.

ConfigParser will read the entire file in any case, so I'm not sure why sorting 
the
entries by server rather than by parameter would make things less efficient...

fwiw, I'd probably use

    [server <name>]

where <name> can be chosen freely by the user, as long as it's unique.  e.g.

    [server server10]
    param = ...

    [server dinsdale.foo.org]
    param = ...

    [server nisse]
    param = ...

but I'm the kind of programmer that prefer to keep things simple, so I'm sure 
you
can find more complicated ways to do things ;-)

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to