[Python-checkins] cpython (3.2): #12448: smtplib now flushes stdout while running ``python -m smtplib``
ezio.melotti
python-checkins at python.org
Tue Oct 18 12:26:59 CEST 2011
http://hg.python.org/cpython/rev/2c50343d0500
changeset: 72970:2c50343d0500
branch: 3.2
parent: 72967:b41def1851b6
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Tue Oct 18 13:20:07 2011 +0300
summary:
#12448: smtplib now flushes stdout while running ``python -m smtplib``
in order to display the prompt correctly. Patch by Petri Lehtinen.
files:
Lib/smtplib.py | 1 +
Misc/NEWS | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -912,6 +912,7 @@
def prompt(prompt):
sys.stdout.write(prompt + ": ")
+ sys.stdout.flush()
return sys.stdin.readline().strip()
fromaddr = prompt("From")
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -47,6 +47,9 @@
Library
-------
+- Issue #12448: smtplib now flushes stdout while running ``python -m smtplib``
+ in order to display the prompt correctly.
+
- Issue #13194: zlib.compressobj().copy() and zlib.decompressobj().copy() are
now available on Windows.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list