[pyrepl-checkins] r44574 - pyrepl/trunk/pyrepl/pyrepl

fijal at codespeak.net fijal at codespeak.net
Thu Jun 28 10:34:30 CEST 2007


Author: fijal
Date: Thu Jun 28 10:34:29 2007
New Revision: 44574

Modified:
   pyrepl/trunk/pyrepl/pyrepl/python_reader.py
Log:
Add a print_banner option to control banner printing.


Modified: pyrepl/trunk/pyrepl/pyrepl/python_reader.py
==============================================================================
--- pyrepl/trunk/pyrepl/pyrepl/python_reader.py	(original)
+++ pyrepl/trunk/pyrepl/pyrepl/python_reader.py	Thu Jun 28 10:34:29 2007
@@ -334,7 +334,7 @@
         self.cocoainteracter = CocoaInteracter.alloc().init(self, inputfilehandle, outputfilehandle)
         
         
-def main(use_pygame_console=0, interactmethod=default_interactmethod):
+def main(use_pygame_console=0, interactmethod=default_interactmethod, print_banner=True):
     si, se, so = sys.stdin, sys.stderr, sys.stdout
     try:
         if 0 and use_pygame_console: # pygame currently borked
@@ -367,9 +367,10 @@
                 else:
                     encoding = None # so you get ASCII...
             con = UnixConsole(0, 1, None, encoding)
-        print "Python", sys.version, "on", sys.platform
-        print 'Type "help", "copyright", "credits" or "license" '\
-              'for more information.'
+        if print_banner:
+            print "Python", sys.version, "on", sys.platform
+            print 'Type "help", "copyright", "credits" or "license" '\
+                  'for more information.'
         sys.path.insert(0, os.getcwd())
 
         if __name__ != '__main__':


More information about the pyrepl-checkins mailing list