|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/22697/root/usr/lib64/python2.4/ |
Upload File : |
mō
=5Dc @ sŽ d Z d k Z d k Z d k l Z l Z d d d d g Z d Z d f d YZ d e f d YZ d d d d
Z e d j o d k
Z
e
i d n d S(
s? Utilities needed to emulate Python's interactive interpreter.
N( s CommandCompilers compile_commandt InteractiveInterpretert InteractiveConsolet interactt compile_commandc C sV d } y
| i } Wn t j
o n Xy
| | _ Wn t t f j
o n X| S( Ni ( t oldvaluet filet softspacet AttributeErrort newvaluet TypeError( R R R ( ( t /usr/lib64/python2.4/code.pyR s
c B sP t Z d Z e d Z d d d Z d Z e d Z d Z d Z RS( sũ Base class for InteractiveConsole.
This class deals with parsing and interpreter state (the user's
namespace); it doesn't deal with input buffering or prompting or
input file naming (the filename is always passed in explicitly).
c C sB | d j o h d d <d d <} n | | _ t | _ d S( s Constructor.
The optional 'locals' argument specifies the dictionary in
which code will be executed; it defaults to a newly created
dictionary with key "__name__" set to "__console__" and key
"__doc__" set to None.
t __name__t __console__t __doc__N( t localst Nonet selft CommandCompilert compile( R R ( ( R
t __init__% s
s <input>t singlec C so y | i | | | } Wn- t t t f j
o | i | t
Sn X| d j o t Sn | i
| t
S( s
Compile and run some source in the interpreter.
Arguments are as for compile_command().
One several things can happen:
1) The input is incorrect; compile_command() raised an
exception (SyntaxError or OverflowError). A syntax traceback
will be printed by calling the showsyntaxerror() method.
2) The input is incomplete, and more input is required;
compile_command() returned None. Nothing happens.
3) The input is complete; compile_command() returned a code
object. The code is executed by calling self.runcode() (which
also handles run-time exceptions, except for SystemExit).
The return value is True in case 2, False in the other cases (unless
an exception is raised). The return value can be used to
decide whether to use sys.ps1 or sys.ps2 to prompt the next
line.
N( R R t sourcet filenamet symbolt codet
OverflowErrort SyntaxErrort
ValueErrort showsyntaxerrort FalseR t Truet runcode( R R R R R ( ( R
t runsource3 s
c B sT y | | i UWn&