commit | fbc3c3c2bed34350e0dde4771805c51b80f2e410 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Sun Oct 13 21:49:06 2013 +0200 |
committer | Georg Brandl <georg@python.org> | Sun Oct 13 21:49:06 2013 +0200 |
tree | 2b24e6b4e81deb42db88bc9d5c204dc059a75c3b | |
parent | a8fc7f6face4aa05b0bd975a3c7f129c67280a81 [diff] [blame] |
Closes #17730: in code.interact(), when banner="", do not print anything. Also adds tests for banner printing.
diff --git a/Lib/code.py b/Lib/code.py index 9020aab..f8184b6 100644 --- a/Lib/code.py +++ b/Lib/code.py
@@ -216,7 +216,7 @@ 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: