diff options
author | Guido van Rossum <guido@python.org> | 1995-09-30 16:49:58 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-09-30 16:49:58 +0000 |
commit | ff398807789a8727780679c802372d990113eaf4 (patch) | |
tree | 070c53236920d14beedd0e8bb95e50a861e363a4 /Lib/formatter.py | |
parent | 2ddb3f5426c73166152ce7bd63bba354e50c6f94 (diff) | |
download | cpython-ff398807789a8727780679c802372d990113eaf4.tar.gz |
add flush_softspace() interface
Diffstat (limited to 'Lib/formatter.py')
-rw-r--r-- | Lib/formatter.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/formatter.py b/Lib/formatter.py index 67d2b16e9a..9ff03b557b 100644 --- a/Lib/formatter.py +++ b/Lib/formatter.py @@ -109,6 +109,11 @@ class AbstractFormatter: self.nospace = self.softspace = 0 self.writer.send_literal_data(data) + def flush_softspace(self): + if self.softspace: + self.nospace = self.softspace = 0 + self.writer.send_flowing_data(' ') + def push_font(self, (size, i, b, tt)): if self.font_stack: csize, ci, cb, ctt = self.font_stack[-1] |