How to eval a file
donnal at donnal.net
Sun Feb 23 22:08:50 CET 2003
Alex Martelli wrote:
> Björn Lindberg wrote:
>>I found the shlex module which made it really easy to parse my
>>configuration file, so I'm doing that now.
> OK, if you can stay away from eval/exec/execfile altogether, you'll no
> doubt be even gladder;-).
I've been thinking about making a configuration file with a syntax
something like this:
Then I planned on reading the file something like this:
f = open(filename)
txt = f.read().replace('\r\n','\n')
Do I understand your previous reply to Björn to mean that I would still
be better off using ConfigParser?
Arkansas Children's Hospital
More information about the Python-list