ConfigParser module in 1.52 is buggy?
Brian Lee
senux at senux.com.NOSPAM
Tue May 29 05:14:15 EDT 2001
Is ConfigParser module in Python 1.52 buggy? Follow is testing of
ConfigParser module both of 1.52 and 2.1. The module works well in
2.1 but not in 1.52.
Anyone in similar situations?
$ cat xmlrpcserver-sx_access.conf
[conf]
* = 127.0.0.1
$ python
Python 1.5.2 (#1, Mar 3 2001, 01:35:43) [GCC 2.96 20000731 (Red Hat
Linux 7.1
2 on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import ConfigParser()
File "<stdin>", line 1
import ConfigParser()
^
SyntaxError: invalid syntax
>>> import ConfigParser
>>> a = ConfigParser.ConfigParser()
>>> a.read("xmlrpcserver-sx_access.conf")
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/usr/lib/python1.5/ConfigParser.py", line 175, in read
self.__read(fp)
File "/usr/lib/python1.5/ConfigParser.py", line 326, in __read
raise e
ConfigParser.ParsingError: File contains parsing errors:
xmlrpcserver-sx_access.
conf
[line 3]: '*\011\011\011= 127.0.0.1\012'
>>>
$ python2.1
Python 2.1 (#1, May 11 2001, 21:59:20)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-81)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import ConfigParser
>>> a = ConfigParser.ConfigParser()
>>> a.read("xmlrpcserver-sx_access.conf")
--
Brian Lee <senux at senux.com>
* Please remove NOSPAM in my email adress to reply to me.
More information about the Python-list
mailing list