A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-November/029993.html below:

[Python-Dev] ConfigParser with a single section

[Python-Dev] ConfigParser with a single section [Python-Dev] ConfigParser with a single sectionGustavo 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 ]



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4