lightweight human-readable config?

Maxim Khesin max at cNvOiSsiPoAnMtech.com
Fri Oct 31 10:42:53 EST 2003


Nick Vargish wrote:
> "John Roth" <newsgroups at jhrothjr.com> writes:
> 
> 
>>for line in inFile.readlines():
>>    key, value = line.split(":")
>>    configdict[key] = value
> 
> 
> for line in inFile.readlines():
>     key, value = line.split(':', 1)  # only split once, values could

Just one comment: using ':' for separator is not a great idea if Windows 
paths are come of the potential values.
m





More information about the Python-list mailing list