some minor tweaks to make it possible to not show the default intro text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -96,6 +96,7 @@ class Crust(wx.SplitterWindow):
|
|||||||
self.lastsashpos = self.GetSashPosition()
|
self.lastsashpos = self.GetSashPosition()
|
||||||
else:
|
else:
|
||||||
self.lastsashpos = -1
|
self.lastsashpos = -1
|
||||||
|
self.issplit = self.IsSplit()
|
||||||
|
|
||||||
def ToggleTools(self):
|
def ToggleTools(self):
|
||||||
"""Toggle the display of the filling and other tools"""
|
"""Toggle the display of the filling and other tools"""
|
||||||
|
@@ -17,7 +17,8 @@ class Interpreter(InteractiveInterpreter):
|
|||||||
revision = __revision__
|
revision = __revision__
|
||||||
|
|
||||||
def __init__(self, locals=None, rawin=None,
|
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."""
|
"""Create an interactive interpreter object."""
|
||||||
InteractiveInterpreter.__init__(self, locals=locals)
|
InteractiveInterpreter.__init__(self, locals=locals)
|
||||||
self.stdin = stdin
|
self.stdin = stdin
|
||||||
@@ -27,10 +28,11 @@ class Interpreter(InteractiveInterpreter):
|
|||||||
import __builtin__
|
import __builtin__
|
||||||
__builtin__.raw_input = rawin
|
__builtin__.raw_input = rawin
|
||||||
del __builtin__
|
del __builtin__
|
||||||
copyright = 'Type "help", "copyright", "credits" or "license"'
|
if showInterpIntro:
|
||||||
copyright += ' for more information.'
|
copyright = 'Type "help", "copyright", "credits" or "license"'
|
||||||
self.introText = 'Python %s on %s%s%s' % \
|
copyright += ' for more information.'
|
||||||
(sys.version, sys.platform, os.linesep, copyright)
|
self.introText = 'Python %s on %s%s%s' % \
|
||||||
|
(sys.version, sys.platform, os.linesep, copyright)
|
||||||
try:
|
try:
|
||||||
sys.ps1
|
sys.ps1
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
@@ -343,11 +343,12 @@ class Shell(editwindow.EditWindow):
|
|||||||
def showIntro(self, text=''):
|
def showIntro(self, text=''):
|
||||||
"""Display introductory text in the shell."""
|
"""Display introductory text in the shell."""
|
||||||
if text:
|
if text:
|
||||||
if not text.endswith(os.linesep):
|
|
||||||
text += os.linesep
|
|
||||||
self.write(text)
|
self.write(text)
|
||||||
try:
|
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:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user