]> git.saurik.com Git - wxWidgets.git/commitdiff
some minor tweaks to make it possible to not show the default intro text
authorRobin Dunn <robin@alldunn.com>
Wed, 17 Jan 2007 23:05:14 +0000 (23:05 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 17 Jan 2007 23:05:14 +0000 (23:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/py/crust.py
wxPython/wx/py/interpreter.py
wxPython/wx/py/shell.py

index c8b8daa9cea10034e4a912208d97caf261bff313..df4d830f04371abd97e165a8db6b054afb4bb095 100644 (file)
@@ -96,6 +96,7 @@ class Crust(wx.SplitterWindow):
             self.lastsashpos = self.GetSashPosition()
         else:
             self.lastsashpos = -1
+        self.issplit = self.IsSplit()       
 
     def ToggleTools(self):
         """Toggle the display of the filling and other tools"""
index 4eef617272e4478464d8b9153569c1153d9ec371..c2415b7458ea41d0e3017cf165d7d4cac4c003fa 100644 (file)
@@ -17,7 +17,8 @@ class Interpreter(InteractiveInterpreter):
     revision = __revision__
     
     def __init__(self, locals=None, rawin=None, 
-                 stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr):
+                 stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr,
+                 showInterpIntro=True):
         """Create an interactive interpreter object."""
         InteractiveInterpreter.__init__(self, locals=locals)
         self.stdin = stdin
@@ -27,10 +28,11 @@ class Interpreter(InteractiveInterpreter):
             import __builtin__
             __builtin__.raw_input = rawin
             del __builtin__
-        copyright = 'Type "help", "copyright", "credits" or "license"'
-        copyright += ' for more information.'
-        self.introText = 'Python %s on %s%s%s' % \
-                         (sys.version, sys.platform, os.linesep, copyright)
+        if showInterpIntro:
+            copyright = 'Type "help", "copyright", "credits" or "license"'
+            copyright += ' for more information.'
+            self.introText = 'Python %s on %s%s%s' % \
+                             (sys.version, sys.platform, os.linesep, copyright)
         try:
             sys.ps1
         except AttributeError:
index fe60b38221bd8c3dc6a8a3ff8b160390d1c713d9..ec8d7f4dae2f618b5548a73fb35610105c1947fb 100644 (file)
@@ -343,11 +343,12 @@ class Shell(editwindow.EditWindow):
     def showIntro(self, text=''):
         """Display introductory text in the shell."""
         if text:
-            if not text.endswith(os.linesep):
-                text += os.linesep
             self.write(text)
         try:
-            self.write(self.interp.introText)
+            if self.interp.introText:
+                if text and not text.endswith(os.linesep):
+                    self.write(os.linesep)
+                self.write(self.interp.introText)
         except AttributeError:
             pass