A RetroSearch Logo

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

Search Query:

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

[Python-Dev] ConfigParser with a single section

[Python-Dev] ConfigParser with a single sectionGuido van Rossum guido@python.org
Fri, 08 Nov 2002 08:24:28 -0500
> > 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.. :-)

Listen, these files are shell scripts.  Any attempts to parse them
with other means than feeding them to the shell are doomed.  Don't try
to tweak ConfigParser to do something it's not good at anyway.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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