From 6ce21297de77129704f850a2046ca2f5baa5cd60 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 30 Sep 2004 15:22:50 +0000 Subject: [PATCH] Line wrapping, and now more showDefault for long things (since I can't figure out how to wrap it), and line-wrapping of serialized NormalizedString things. --- src/registry.py | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/registry.py b/src/registry.py index 3f7675909..5ce715081 100644 --- a/src/registry.py +++ b/src/registry.py @@ -30,6 +30,7 @@ __revision__ = "$Id$" import re +import os import sets import time import string @@ -62,15 +63,20 @@ def open(filename, clear=False): _cache.clear() _fd = file(filename) fd = utils.nonCommentNonEmptyLines(_fd) - for (i, line) in enumerate(fd): + acc = '' + for line in fd: line = line.rstrip('\r\n') + if line.endswith('\\'): + acc += line[:-1] + continue + else: + acc = line try: - #print '***', repr(line) - (key, value) = re.split(r'(?