mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Closes #17730: in code.interact(), when banner="", do not print anything.
Also adds tests for banner printing.
This commit is contained in:
parent
a8fc7f6fac
commit
fbc3c3c2be
3 changed files with 19 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue