From fbc3c3c2bed34350e0dde4771805c51b80f2e410 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 13 Oct 2013 21:49:06 +0200 Subject: Closes #17730: in code.interact(), when banner="", do not print anything. Also adds tests for banner printing. --- Lib/code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/code.py') diff --git a/Lib/code.py b/Lib/code.py index 9020aab701..f8184b6c22 100644 --- a/Lib/code.py +++ b/Lib/code.py @@ -216,7 +216,7 @@ class InteractiveConsole(InteractiveInterpreter): self.write("Python %s on %s\n%s\n(%s)\n" % (sys.version, sys.platform, cprt, self.__class__.__name__)) - else: + elif banner: self.write("%s\n" % str(banner)) more = 0 while 1: -- cgit v1.2.1