From c517b9b40646a2aac735a82a0334fbc4bff04654 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 28 Feb 2000 20:59:03 +0000 Subject: [PATCH] (Finally!) Changes related to the ConfigParser/INI-file topics discussed on c.l.py last January. Specifically: - more characters allowed in section & option names - if '=' is used to separate the option & value, the value can be followed by a comment of the form '\s;' --- Lib/ConfigParser.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py index f0611f6879..e871cc5478 100644 --- a/Lib/ConfigParser.py +++ b/Lib/ConfigParser.py @@ -292,12 +292,12 @@ class ConfigParser: # of \w, _ is allowed in section header names. SECTCRE = re.compile( r'\[' # [ - r'(?P
[-\w]+)' # `-', `_' or any alphanum + r'(?P
[-\w_.*,(){}]+)' # `-', `_' or any alphanum r'\]' # ] ) OPTCRE = re.compile( - r'(?P