/usr/lib64/python2.6/Demo/parser
NameSizeModeActions
docstring.py270644editdlrm
docstring.pyc1750644editdlrm
docstring.pyo1750644editdlrm
example.py57220644editdlrm
example.pyc72400644editdlrm
example.pyo72400644editdlrm
FILES910644editdlrm
README9130644editdlrm
simple.py290644editdlrm
simple.pyc2790644editdlrm
simple.pyo2790644editdlrm
source.py7410644editdlrm
source.pyc15840644editdlrm
source.pyo15840644editdlrm
test_parser.py11960755editdlrm
test_parser.pyc14540644editdlrm
test_parser.pyo14540644editdlrm
texipre.dat43480644editdlrm
unparse.py138780644editdlrm
unparse.pyc214890644editdlrm
unparse.pyo214890644editdlrm
Edit: /usr/lib64/python2.6/Demo/parser/example.pyo (7240B)
Ńň Ťgc@sşdZddkZddkZddkZddkZddkZddklZlZd„Zddd„ƒYZ ddd„ƒYZ d e e fd „ƒYZ d e fd „ƒYZ d e e fd„ƒYZ dd„ZeieidgffZeieieieieieieieieieieieieieiei ei!ei"ei#ei$dgfffffffffffffffffei%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|ƒiƒ}tiitii|ƒdƒ}ti|ƒ}t|i ƒ|ƒ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.6/Demo/parser/example.pytget_docss"t SuiteInfoBasecBsVeZdZdZdd„Zd„Zd„Zd„Zd„Z d„Z d„Z RS( tcCs.h|_h|_|o|i|ƒndS(N(t _class_infot_function_infot _extract_info(tselfttree((s+/usr/lib64/python2.6/Demo/parser/example.pyt__init__!s  cCs t|ƒdjo!ttd|dƒ\}}ntt|dƒ\}}|ot|dƒ|_nxŽ|dD]˘}tt|ƒ\}}|o€|d}|dtijo%|dd}t|ƒ|i |scCs |iiƒS(N(Rtkeys(R((s+/usr/lib64/python2.6/Demo/parser/example.pytget_class_namesAscCs |i|S(N(R(RR)((s+/usr/lib64/python2.6/Demo/parser/example.pytget_class_infoDscCs1y|i|SWntj o|i|SXdS(N(RtKeyErrorR(RR)((s+/usr/lib64/python2.6/Demo/parser/example.pyt __getitem__GsN( t__name__t __module__RR+tNoneRRR*R,R.R/R1(((s+/usr/lib64/python2.6/Demo/parser/example.pyRs      t SuiteFuncInfocBseZd„Zd„ZRS(cCs |iiƒS(N(RR-(R((s+/usr/lib64/python2.6/Demo/parser/example.pytget_function_namesQscCs |i|S(N(R(RR)((s+/usr/lib64/python2.6/Demo/parser/example.pytget_function_infoTs(R2R3R6R7(((s+/usr/lib64/python2.6/Demo/parser/example.pyR5Ns R"cBseZdd„ZRS(cCs7|dd|_ti||o |dpdƒdS(Niii˙˙˙˙(R+RRR4(RR((s+/usr/lib64/python2.6/Demo/parser/example.pyRYsN(R2R3R4R(((s+/usr/lib64/python2.6/Demo/parser/example.pyR"XsR$cBs&eZdd„Zd„Zd„ZRS(cCs7|dd|_ti||o |dpdƒdS(Niii˙˙˙˙(R+RRR4(RR((s+/usr/lib64/python2.6/Demo/parser/example.pyR_scCs |iiƒS(N(RR-(R((s+/usr/lib64/python2.6/Demo/parser/example.pytget_method_namescscCs |i|S(N(R(RR)((s+/usr/lib64/python2.6/Demo/parser/example.pytget_method_infofsN(R2R3R4RR8R9(((s+/usr/lib64/python2.6/Demo/parser/example.pyR$^s  R cBseZddd„ZRS(scCsY||_ti||ƒ|o5tt|dƒ\}}|o|d|_qUndS(NiR(R+RRRRR(RRR)R%R&((s+/usr/lib64/python2.6/Demo/parser/example.pyRks  N(R2R3R4R(((s+/usr/lib64/python2.6/Demo/parser/example.pyR jscCsÜ|djo h}nt|ƒtjo|||dsF      1   + ?