Re: ConfigParser and multiple option names

2006-05-10 Thread Florian Lindner
[EMAIL PROTECTED] wrote: > that will break horribly in windows, remenber it install all it's crap > in c:\Program Files Why should this break? If you split at the \n character? Florian -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser and multiple option names

2006-05-05 Thread Ivan Vinogradov
Another option is to use a dedicated section and simply omit values for options: [dirs] /path/1: /long/path/2: /etc: Then get options for section dirs. This approach precludes using ':' or '=' in paths though. -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser and multiple option names

2006-05-05 Thread [EMAIL PROTECTED]
that will break horribly in windows, remenber it install all it's crap in c:\Program Files -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser and multiple option names

2006-05-03 Thread Alexis Roda
Not tested by me, but according to docs it does support list values: http://cheeseshop.python.org/pypi/ConfigObj Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser and multiple option names

2006-05-03 Thread Caleb Hattingh
I have had this same problem before, and what I ended up doing was writing my own far more limited config parser that would create lists for repeated named assignments. Who is the maintainer of ConfigParser? Perhaps a keyword option can be added so that this kind of behaviour can be added at cre

Re: ConfigParser and multiple option names

2006-05-02 Thread alisonken1
Benji York wrote: > > I generally do this: > > dirs = > /home/florian > /home/john > /home/whoever > > ...and then use str.split() in my program. > -- > Benji York The only problem with this would be if you plan on updating the config file later in the program - I don't think Con

Re: ConfigParser and multiple option names

2006-05-02 Thread Benji York
Florian Lindner wrote: > since ConfigParser does not seem to support multiple times the same option > name, like: > > dir="/home/florian" > dir="/home/john" > dir="/home/whoever" I generally do this: dirs = /home/florian /home/john /home/whoever ...and then use str.split() in my

Re: ConfigParser and multiple option names

2006-05-02 Thread alisonken1
Florian Lindner wrote: > Hello, > since ConfigParser does not seem to support multiple times the same option > name, like: > > dir="/home/florian" > dir="/home/john" > dir="/home/whoever" Another option would be to switch to the XMLParser library and use an XML file for the configuration. That w

Re: ConfigParser and multiple option names

2006-05-02 Thread Edward Elliott
Florian Lindner wrote: > I think the best solution would be to use a seperation character: > > dir="/home/florian, /home/john, home/whoever" > > What character would be best to work on various operating systems? (of > what names may a path consist is the question) I don't think there are any uni

Re: ConfigParser and multiple option names

2006-05-02 Thread Larry Bates
Florian Lindner wrote: > Hello, > since ConfigParser does not seem to support multiple times the same option > name, like: > > dir="/home/florian" > dir="/home/john" > dir="/home/whoever" > > (only the last one is read in) > > I wonder what the best way to work around this. > > I think the best

Re: ConfigParser and multiple option names

2006-05-02 Thread Florian Lindner
Alexis Roda wrote: > Florian Lindner escribió: >> I think the best solution would be to use a seperation character: >> >> dir="/home/florian, /home/john, home/whoever" > > RCS uses , in filenames A kommata (,) is a valid character in path names. Ok, you can use quotes. >> What do you think? An

Re: ConfigParser and multiple option names

2006-05-02 Thread Alexis Roda
Florian Lindner escribió: > I think the best solution would be to use a seperation character: > > dir="/home/florian, /home/john, home/whoever" RCS uses , in filenames > What do you think? Any better ideas? A bit ugly, but probably safer and simpler than adding arbitrary separators: [section]