[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.219.192.133: ~ $
�
V
�Qc@s�dZddlZddlZddlZddlZddlZddlmZmZd�Zddd��YZ	ddd��YZ
d	e	e
fd
��YZde	fd��YZd
e	e
fd��YZ
dd�ZejejdgffZejejejejejejejejejejejejejejej ej!ej"ej#ej$dgfffffffffffffffffej%dfffZ&dS(s�Simple code to extract class & function docstrings from a module.

This code is used as an example in the library reference manual in the
section on using the parser module.  Refer to the manual for a thorough
discussion of the operation of this code.
i����N(tListTypet	TupleTypecCsVt|�j�}tjjtjj|�d�}tj|�}t|j	�|�S(s�Retrieve information from the parse tree of a source file.

    fileName
        Name of the file to read Python source code from.
    i(
topentreadtostpathtbasenametsplitexttparsertsuitet
ModuleInfottotuple(tfileNametsourceRtast((s+/usr/lib64/python2.7/Demo/parser/example.pytget_docss"t
SuiteInfoBasecBsVeZdZdZdd�Zd�Zd�Zd�Zd�Z	d�Z
d�ZRS(	tcCs,i|_i|_|r(|j|�ndS(N(t_class_infot_function_infot
_extract_info(tselfttree((s+/usr/lib64/python2.7/Demo/parser/example.pyt__init__!s		cCst|�dkr2ttd|d�\}}ntt|d�\}}|rgt|d�|_nx�|dD]�}tt|�\}}|rr|d}|dtjkr�|dd}t|�|j	|<q|dtj
kr|dd}t|�|j|<qqrqrWdS(Niiit	docstringtcompoundi(
tlentmatchtDOCSTRING_STMT_PATTERNtevalt
_docstringtCOMPOUND_STMT_PATTERNtsymboltfuncdeftFunctionInfoRtclassdeft	ClassInfoR(RRtfoundtvarstnodetcstmttname((s+/usr/lib64/python2.7/Demo/parser/example.pyR's 
cCs|jS(N(R(R((s+/usr/lib64/python2.7/Demo/parser/example.pyt
get_docstring;scCs|jS(N(t_name(R((s+/usr/lib64/python2.7/Demo/parser/example.pytget_name>scCs
|jj�S(N(Rtkeys(R((s+/usr/lib64/python2.7/Demo/parser/example.pytget_class_namesAscCs|j|S(N(R(RR)((s+/usr/lib64/python2.7/Demo/parser/example.pytget_class_infoDscCs/y|j|SWntk
r*|j|SXdS(N(RtKeyErrorR(RR)((s+/usr/lib64/python2.7/Demo/parser/example.pyt__getitem__Gs
N(t__name__t
__module__RR+tNoneRRR*R,R.R/R1(((s+/usr/lib64/python2.7/Demo/parser/example.pyRs					t
SuiteFuncInfocBseZd�Zd�ZRS(cCs
|jj�S(N(RR-(R((s+/usr/lib64/python2.7/Demo/parser/example.pytget_function_namesQscCs|j|S(N(R(RR)((s+/usr/lib64/python2.7/Demo/parser/example.pytget_function_infoTs(R2R3R6R7(((s+/usr/lib64/python2.7/Demo/parser/example.pyR5Ns	R"cBseZdd�ZRS(cCs5|dd|_tj||r*|dp-d�dS(Niii����(R+RRR4(RR((s+/usr/lib64/python2.7/Demo/parser/example.pyRYsN(R2R3R4R(((s+/usr/lib64/python2.7/Demo/parser/example.pyR"XsR$cBs&eZdd�Zd�Zd�ZRS(cCs5|dd|_tj||r*|dp-d�dS(Niii����(R+RRR4(RR((s+/usr/lib64/python2.7/Demo/parser/example.pyR_scCs
|jj�S(N(RR-(R((s+/usr/lib64/python2.7/Demo/parser/example.pytget_method_namescscCs|j|S(N(R(RR)((s+/usr/lib64/python2.7/Demo/parser/example.pytget_method_infofsN(R2R3R4RR8R9(((s+/usr/lib64/python2.7/Demo/parser/example.pyR$^s	R
cBseZddd�ZRS(s<string>cCsU||_tj||�|rQtt|d�\}}|rQ|d|_qQndS(NiR(R+RRRRR(RRR)R%R&((s+/usr/lib64/python2.7/Demo/parser/example.pyRks	N(R2R3R4R(((s+/usr/lib64/python2.7/Demo/parser/example.pyR
jscCs�|dkri}nt|�tkr?|||d<d|fSt|�tk	ra||k|fSt|�t|�kr�d|fSxBtd||�D].\}}t|||�\}}|s�Pq�q�W||fS(saMatch `data' to `pattern', with variable extraction.

    pattern
        Pattern to match against, possibly containing variables.

    data
        Data to be checked and against which variables are extracted.

    vars
        Dictionary of variables which have already been found.  If not
        provided, an empty dictionary is created.

    The `pattern' value may contain variables of the form ['varname'] which
    are allowed to match anything.  The value that is matched is returned as
    part of a dictionary which maps 'varname' to the matched value.  'varname'
    is not required to be a string object, but using strings makes patterns
    and the code which uses them more readable.

    This function returns two values: a boolean indicating whether a match
    was found and a dictionary mapping variable names to their associated
    values.
    iiN(R4ttypeRRRtmapR(tpatterntdataR&tsame((s+/usr/lib64/python2.7/Demo/parser/example.pyRts	

RRR((('t__doc__RRR ttokenttypesRRRRR5R"R$R
R4Rtstmtt
compound_stmtRtsimple_stmtt
small_stmtt	expr_stmtttestlistttesttand_testtnot_testt
comparisontexprtxor_exprtand_exprt
shift_exprt
arith_exprttermtfactortpowertatomtSTRINGtNEWLINER(((s+/usr/lib64/python2.7/Demo/parser/example.pyt<module>sF	1

+	?

Filemanager

Name Type Size Permission Actions
.docstring.pyo.40009 File 175 B 0644
.example.pyo.40009 File 7.04 KB 0644
.simple.pyo.40009 File 279 B 0644
.source.pyo.40009 File 1.55 KB 0644
.test_parser.pyo.40009 File 1.41 KB 0644
.test_unparse.pyo.40009 File 8.45 KB 0644
FILES File 91 B 0644
README File 1.01 KB 0644
docstring.py File 27 B 0644
docstring.pyc File 175 B 0644
docstring.pyo File 175 B 0644
example.py File 5.59 KB 0644
example.pyc File 7.04 KB 0644
example.pyo File 7.04 KB 0644
simple.py File 29 B 0644
simple.pyc File 279 B 0644
simple.pyo File 279 B 0644
source.py File 741 B 0644
source.pyc File 1.55 KB 0644
source.pyo File 1.55 KB 0644
test_parser.py File 1.16 KB 0755
test_parser.pyc File 1.41 KB 0644
test_parser.pyo File 1.41 KB 0644
test_unparse.py File 5.44 KB 0644
test_unparse.pyc File 8.45 KB 0644
test_unparse.pyo File 8.45 KB 0644
unparse.py File 16.85 KB 0644
unparse.pyc File 23.44 KB 0644
unparse.pyo File 23.36 KB 0644