diff --git a/IPython/core/iplib.py b/IPython/core/iplib.py index 282694e..eea73bf 100644 --- a/IPython/core/iplib.py +++ b/IPython/core/iplib.py @@ -382,6 +382,7 @@ class InteractiveShell(Component, Magic): self.hooks.late_startup_hook() def get_ipython(self): + """Return the currently running IPython instance.""" return self #------------------------------------------------------------------------- diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index ddaf0b2..ddb7ff0 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -263,7 +263,7 @@ def _fixed_getinnerframes(etb, context=1,tb_offset=0): _parser = PyColorize.Parser() -def _formatTracebackLines(lnum, index, lines, Colors, lvals=None,scheme=None): +def _format_traceback_lines(lnum, index, lines, Colors, lvals=None,scheme=None): numbers_width = INDENT_SIZE - 1 res = [] i = lnum - index @@ -781,8 +781,8 @@ class VerboseTB(TBTools): frames.append(level) else: frames.append('%s%s' % (level,''.join( - _formatTracebackLines(lnum,index,lines,Colors,lvals, - col_scheme)))) + _format_traceback_lines(lnum,index,lines,Colors,lvals, + col_scheme)))) # Get (safely) a string form of the exception info try: diff --git a/IPython/frontend/prefilterfrontend.py b/IPython/frontend/prefilterfrontend.py index 6d35d74..239435c 100644 --- a/IPython/frontend/prefilterfrontend.py +++ b/IPython/frontend/prefilterfrontend.py @@ -130,7 +130,7 @@ class PrefilterFrontEnd(LineFrontEndBase): if not 'banner' in kwargs and self.banner is None: - self.banner = self.ipython0.BANNER + self.banner = self.ipython0.banner # FIXME: __init__ and start should be two different steps self.start() diff --git a/IPython/kernel/core/interpreter.py b/IPython/kernel/core/interpreter.py index 37d62e2..9d9a2be 100644 --- a/IPython/kernel/core/interpreter.py +++ b/IPython/kernel/core/interpreter.py @@ -211,7 +211,7 @@ class Interpreter(object): #### Public 'Interpreter' interface ######################################## - def formatTraceback(self, et, ev, tb, message=''): + def format_traceback(self, et, ev, tb, message=''): """Put a formatted version of the traceback into value and reraise. When exceptions have to be sent over the network, the traceback @@ -375,7 +375,6 @@ class Interpreter(object): exec code in self.user_ns outflag = 0 except SystemExit: - self.resetbuffer() self.traceback_trap.args = sys.exc_info() except: self.traceback_trap.args = sys.exc_info() @@ -395,7 +394,7 @@ class Interpreter(object): python = self.translator(python) self.execute_python(python) - def getCommand(self, i=None): + def get_command(self, i=None): """Gets the ith message in the message_cache. This is implemented here for compatibility with the old ipython1 shell diff --git a/IPython/kernel/engineservice.py b/IPython/kernel/engineservice.py index e5dadb3..68604cf 100644 --- a/IPython/kernel/engineservice.py +++ b/IPython/kernel/engineservice.py @@ -387,7 +387,7 @@ class EngineService(object, service.Service): # tb=traceback object et,ev,tb = sys.exc_info() # This call adds attributes to the exception value - et,ev,tb = self.shell.formatTraceback(et,ev,tb,msg) + et,ev,tb = self.shell.format_traceback(et,ev,tb,msg) # Add another attribute ev._ipython_engine_info = msg f = failure.Failure(ev,et,None) @@ -444,7 +444,7 @@ class EngineService(object, service.Service): msg = {'engineid':self.id, 'method':'get_result', 'args':[repr(i)]} - d = self.executeAndRaise(msg, self.shell.getCommand, i) + d = self.executeAndRaise(msg, self.shell.get_command, i) d.addCallback(self.addIDToResult) return d @@ -877,7 +877,7 @@ class ThreadedEngineService(EngineService): # tb=traceback object et,ev,tb = sys.exc_info() # This call adds attributes to the exception value - et,ev,tb = self.shell.formatTraceback(et,ev,tb,msg) + et,ev,tb = self.shell.format_traceback(et,ev,tb,msg) # Add another attribute # Create a new exception with the new attributes diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 91034a8..c3d5ca6 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -228,9 +228,8 @@ class IPTester(object): except OSError: # This is just a best effort, if we fail or the process was # really gone, ignore it. - pass - - + pass + def make_runners(): """Define the top-level packages that need to be tested.