[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
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
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
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
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
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 solution would be to use a seperation character:
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? Any better
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 solution would be
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
Benji York wrote:
SNIP
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
10 matches
Mail list logo