Closes #17730: in code.interact(), when banner="", do not print anything.

Also adds tests for banner printing.
This commit is contained in:
Georg Brandl 2013-10-13 21:49:06 +02:00
parent a8fc7f6fac
commit fbc3c3c2be
3 changed files with 19 additions and 2 deletions

View file

@ -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: