diff options
author | Guido van Rossum <guido@python.org> | 1995-09-30 16:49:58 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-09-30 16:49:58 (GMT) |
commit | c7ae92069d9b83b3c50ffd68b86a97a28d6f75cc (patch) | |
tree | 8c3cc1f5e0235095bce8c6950ad2ea4e254166de /Lib | |
parent | e3d9320fc570cb3a02240f41963e05a2b8d9f51a (diff) | |
download | cpython-c7ae92069d9b83b3c50ffd68b86a97a28d6f75cc.zip cpython-c7ae92069d9b83b3c50ffd68b86a97a28d6f75cc.tar.gz cpython-c7ae92069d9b83b3c50ffd68b86a97a28d6f75cc.tar.bz2 |
add flush_softspace() interface
Diffstat (limited to 'Lib')
-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 67d2b16..9ff03b5 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] |