This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ConfigParser bug
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, jrm, mrsmile
Priority: normal Keywords:

Created on 2003-12-10 22:00 by mrsmile, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test.zip mrsmile, 2003-12-10 22:00 Test driver + Config file
Messages (3)
msg19371 - (view) Author: Michel Martin (mrsmile) Date: 2003-12-10 22:00
Python Version: 2.3.2c1
OS: Windows 2000
-----------------------

Hello,

       I was trying to use the ConfigParser provided
with Python when I realized that there is a problem
with the case in the string passed in the Interpolation
feature.

       Explicitely, test1 works but test2 doesn't. You
can see by yourself with the attachment.

===========================
[Test1]
logFullPath: c:/logs/%(logfilename)s
logFilename=test.log

[Test2]
logFullPath: c:/logs/%(logFilename)s
logFilename=test.log
===========================

Using a capital letter in %('string')s doesn't work,
even if the key is declared with a capital letter. How
could we fix this?

Thanks for your help,
Best regards,

Michel Martin
msg19372 - (view) Author: Jordan R McCoy (jrm) Date: 2003-12-24 17:28
Logged In: YES 
user_id=813983

See patch request #865455 for an explanation of the problem 
and a patch solution.
msg19373 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2004-05-18 02:28
Logged In: YES 
user_id=3066

I've committed a patch that fixes this on the Python
development trunk (what will become Python 2.4).  The fix is
similar to SF patch #865455.

Doc/lib/libcfgparser.tex 1.35
Lib/ConfigParser.py 1.64
Lib/test/test_cfgparser.py 1.21
History
Date User Action Args
2022-04-11 14:56:01adminsetgithub: 39692
2003-12-10 22:00:50mrsmilecreate