Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.support.werkzeug.debug.console._InteractiveConsole Class Reference

List of all members.

Public Member Functions

def __init__
def runsource
def runcode
def showtraceback
def showsyntaxerror
def write

Public Attributes

 globals
 loader
 more
 buffer

Detailed Description

Definition at line 132 of file console.py.


Constructor & Destructor Documentation

Definition at line 134 of file console.py.

00134 
00135     def __init__(self, globals, locals):
00136         code.InteractiveInterpreter.__init__(self, locals)
00137         self.globals = dict(globals)
00138         self.globals['dump'] = dump
00139         self.globals['help'] = helper
00140         self.globals['__loader__'] = self.loader = _ConsoleLoader()
00141         self.more = False
00142         self.buffer = []
00143         _wrap_compiler(self)


Member Function Documentation

Definition at line 161 of file console.py.

00161 
00162     def runcode(self, code):
00163         try:
00164             exec code in self.globals, self.locals
00165         except:
00166             self.showtraceback()

Here is the call graph for this function:

Definition at line 144 of file console.py.

00144 
00145     def runsource(self, source):
00146         source = source.rstrip() + '\n'
00147         ThreadedStream.push()
00148         prompt = self.more and '... ' or '>>> '
00149         try:
00150             source_to_eval = ''.join(self.buffer + [source])
00151             if code.InteractiveInterpreter.runsource(self,
00152                source_to_eval, '<debugger>', 'single'):
00153                 self.more = True
00154                 self.buffer.append(source)
00155             else:
00156                 self.more = False
00157                 del self.buffer[:]
00158         finally:
00159             output = ThreadedStream.fetch()
00160         return prompt + source + output

Definition at line 172 of file console.py.

00172 
00173     def showsyntaxerror(self, filename=None):
00174         from werkzeug.debug.tbtools import get_current_traceback
00175         tb = get_current_traceback(skip=4)
00176         sys.stdout._write(tb.render_summary())

Here is the call graph for this function:

Definition at line 167 of file console.py.

00167 
00168     def showtraceback(self):
00169         from werkzeug.debug.tbtools import get_current_traceback
00170         tb = get_current_traceback(skip=1)
00171         sys.stdout._write(tb.render_summary())

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 177 of file console.py.

00177 
00178     def write(self, data):
00179         sys.stdout.write(data)
00180 

Here is the caller graph for this function:


Member Data Documentation

Definition at line 141 of file console.py.

Definition at line 136 of file console.py.

Definition at line 139 of file console.py.

Definition at line 140 of file console.py.


The documentation for this class was generated from the following file: