[Python-Dev] ConfigParser with a single section
Gustavo Niemeyer
niemeyer@conectiva.com
Fri, 8 Nov 2002 11:10:23 -0200
> However, in most cases, such files can be easily read with execfile,
> passing an empty dictionary.
Unfortunately, variables without quotes is a common shell idiom:
>>> execfile("/etc/sysconfig/network-scripts/ifcfg-lo")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/etc/sysconfig/network-scripts/ifcfg-lo", line 2
IPADDR=127.0.0.1
^
SyntaxError: invalid syntax
(no, I haven't tweaked the file just to show that.. :-)
--
Gustavo Niemeyer
[ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]