summaryrefslogtreecommitdiff
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-10-18 13:20:07 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2011-10-18 13:20:07 +0300
commit6bfecd1271b305afcbe3f3f68980f89aa44e1910 (patch)
tree312101304000d2e3b7942ffa9fb2894002675bdd /Lib/smtplib.py
parent67494f22243803422a91634945ae405c5a858939 (diff)
downloadcpython-git-6bfecd1271b305afcbe3f3f68980f89aa44e1910.tar.gz
#12448: smtplib now flushes stdout while running ``python -m smtplib``
in order to display the prompt correctly. Patch by Petri Lehtinen.
Diffstat (limited to 'Lib/smtplib.py')
-rw-r--r--Lib/smtplib.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 13c56e196f..fbef96e691 100644
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -912,6 +912,7 @@ if __name__ == '__main__':
def prompt(prompt):
sys.stdout.write(prompt + ": ")
+ sys.stdout.flush()
return sys.stdin.readline().strip()
fromaddr = prompt("From")