Ńņ
#
Hc @ s d d k l Z d d k Z d d k Z d d k Z d d k Z e i Z d e f d YZ d e i
f d YZ d S( i’’’’( t StringIONt EvalContextc B s e Z d Z d Z d Z RS( s%
Class that represents a interactive interface. It has its own
namespace. Use eval_context.exec_expr(expr) to run commands; the
output of those commands is returned, as are print statements.
This is essentially what doctest does, and is taken directly from
doctest.
c C s | | _ | | _ d S( N( t namespacet globs( t selfR R ( ( s8 /usr/lib/python2.6/site-packages/weberror/evalcontext.pyt __init__ s c B sŪ e } e i e i } z e | } | i | i e _ | e _ y6 e | d d d d } | | i
| i U| i Wn6 e
j
o
n" e i d | | i n XWd | e _ e i X| i S( Ns t singlei i t file( R t exec_lockt acquiret syst stdoutt _OutputRedirectingPdbt resett set_tracet pdbt compileR R t set_continuet KeyboardInterruptt tracebackt print_exct releaset getvalue( R t st outt save_stdoutt debuggert code( ( s8 /usr/lib/python2.6/site-packages/weberror/evalcontext.pyt exec_expr s(
( t __name__t
__module__t __doc__R R ( ( ( s8 /usr/lib/python2.6/site-packages/weberror/evalcontext.pyR s R c B s e Z d Z d Z d Z RS( sĄ
A specialized version of the python debugger that redirects stdout
to a given stream when interacting with the user. Stdout is *not*
redirected when traced code is executed.
c C s | | _ t i i | d S( N( t _OutputRedirectingPdb__outR t PdbR ( R R ( ( s8 /usr/lib/python2.6/site-packages/weberror/evalcontext.pyR 6 s c G s= t i } | i t _ z t i i | | SWd | t _ Xd S( N( R
R R R R! t trace_dispatch( R t argsR ( ( s8 /usr/lib/python2.6/site-packages/weberror/evalcontext.pyR" : s
( R R R R R" ( ( ( s8 /usr/lib/python2.6/site-packages/weberror/evalcontext.pyR 0 s ( t cStringIOR R t threadingR R
t LockR t objectR R! R ( ( ( s8 /usr/lib/python2.6/site-packages/weberror/evalcontext.pyt s '