JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrў f'c@sdZddlZddlZddlTddlmZddddd d d d geZ[ejejeje fZ d dZ dddZ dddZidd6dd6dd6dd6dd6dd6dd6Zdd Zd!dZd"d#Zd$d Zd/d%dZd0dddd&d'Zd(d)ZeZd*d Zd+d Zd,d-Zed.kr|endS(1u0Disassembler of Python byte code into mnemonics.iN(u*(u__all__u code_infoudisu disassembleudistbudiscoufindlinestartsu findlabelsu show_codec CsAyt||d}Wn$tk r<t||d}YnX|S(uAttempts to compile the given source, first as an expression and then as a statement if the first approach fails. Utility function to accept strings in functions that otherwise expect code objects uevaluexec(ucompileu SyntaxError(usourceunameuc((u(/opt/alt/python33/lib64/python3.3/dis.pyu _try_compiles  u _try_compilecCsl|dkrtdSt|dr2|j}nt|drM|j}nt|drt|jj}x|D]v\}}t|t rxt d|yt |Wn2t k r}zt d|WYdd}~XnXt qxqxWnst|drt |nWt|ttfr3t|n5t|trOt|nt dt|jdS( unDisassemble classes, methods, functions, or code. With no argument, disassemble the last traceback. Nu__func__u__code__u__dict__uDisassembly of %s:uSorry:uco_codeu(don't know how to disassemble %s objects(uNoneudistbuhasattru__func__u__code__usortedu__dict__uitemsu isinstanceu _have_codeuprintudisu TypeErroru disassembleubytesu bytearrayu_disassemble_bytesustru_disassemble_strutypeu__name__(uxuitemsunameux1umsg((u(/opt/alt/python33/lib64/python3.3/dis.pyudiss2       c Csp|dkrVy tj}Wntk r9tdYnXx|jrR|j}q=Wnt|jj|j dS(u2Disassemble a traceback (default: last traceback).u no last traceback to disassembleN( uNoneusysulast_tracebackuAttributeErroru RuntimeErrorutb_nextu disassembleutb_frameuf_codeutb_lasti(utb((u(/opt/alt/python33/lib64/python3.3/dis.pyudistb=s    u OPTIMIZEDiu NEWLOCALSiuVARARGSiu VARKEYWORDSiuNESTEDiu GENERATORi uNOFREEi@cCsg}xqtdD]P}d|>}||@r|jtj|t|||N}|scPqcqqW|jt|dj|S(u+Return pretty representation of code flags.i iu, (urangeuappenduCOMPILER_FLAG_NAMESugetuhexujoin(uflagsunamesuiuflag((u(/opt/alt/python33/lib64/python3.3/dis.pyu pretty_flagsTs    u pretty_flagscCst|dr|j}nt|dr6|j}nt|trWt|d}nt|drpt|Stdt|j dS(u1Formatted details of methods, functions, or code.u__func__u__code__u uco_codeu(don't know how to disassemble %s objectsN( uhasattru__func__u__code__u isinstanceustru _try_compileu_format_code_infou TypeErrorutypeu__name__(ux((u(/opt/alt/python33/lib64/python3.3/dis.pyu code_infobs   cCsg}|jd|j|jd|j|jd|j|jd|j|jd|j|jd|j|jdt|j|j r|jdx+t |j D]}|jd |qWn|j r |jd x+t |j D]}|jd |qWn|j rd|jd x+t |j D]}|jd |qFWn|j r|jd x+t |j D]}|jd |qWn|jr|jdx+t |jD]}|jd |qWndj|S(NuName: %suFilename: %suArgument count: %suKw-only arguments: %suNumber of locals: %suStack size: %suFlags: %su Constants:u%4d: %ruNames:u%4d: %suVariable names:uFree variables:uCell variables:u (uappenduco_nameu co_filenameu co_argcountuco_kwonlyargcountu co_nlocalsu co_stacksizeu pretty_flagsuco_flagsu co_constsu enumerateuco_namesu co_varnamesu co_freevarsu co_cellvarsujoin(ucoulinesui_cui_n((u(/opt/alt/python33/lib64/python3.3/dis.pyu_format_code_infops:          u_format_code_infocCstt|dS(u7Print details of methods, functions, or code to stdout.N(uprintu code_info(uco((u(/opt/alt/python33/lib64/python3.3/dis.pyu show_codesc CsB|j}t|}tt|}t|}d}d}d}x||kr=||} ||kr|dkrtntd||ddntddd||krtdddntddd||krtdddntdddtt|jd ddtt | j d dd|d }| t kr3||||d d |} d}|d }| t kr| d}ntt| jddd| t krtdt|j| dddq3| tkr#td|j| dddq3| tkrTtdt|| dddq3| tkrtd|j| dddq3| tkrtdt| dddq3| tkr|dkr|j|j}ntd|| dddq3| tkr3td||d ||d fddq3ntqHWdS(uDisassemble a code object.iu%3duendu u u-->u>>u iiiiiiiu(u)u(to u (%d positional, %d keyword pair)N(uco_codeu findlabelsudictufindlinestartsulenuNoneuprintureprurjustuopnameuljustu HAVE_ARGUMENTu EXTENDED_ARGuhasconstu co_constsuhasnameuco_namesuhasjreluhaslocalu co_varnamesu hascompareucmp_opuhasfreeu co_cellvarsu co_freevarsuhasnargs( ucoulastiucodeulabelsu linestartsunuiu extended_argufreeuopuoparg((u(/opt/alt/python33/lib64/python3.3/dis.pyu disassembles`               ( " % "    *c Cst|}t|}d}x||kr||}||krVtdddntddd||krtdddntdddtt|jdddtt|jd dd|d }|tkr||||d d } |d }tt| jd dd|tkrx|ratdt|| dddqtd| ddq|t kr|dk rtd|| dddqtd| ddq|t krtdt|| dddq|t kr?|r(td|| dddqtd| ddq|t krjtdt| dddq|tkrtd||d ||d fddqntq!WdS(Niu-->uendu u u>>u iiiiiiu(u)u(%d)u(to u (%d positional, %d keyword pair)(u findlabelsulenuprintureprurjustuopnameuljustu HAVE_ARGUMENTuhasconstuhasnameuNoneuhasjreluhaslocalu hascompareucmp_opuhasnargs( ucodeulastiuvarnamesunamesu constantsulabelsunuiuopuoparg((u(/opt/alt/python33/lib64/python3.3/dis.pyu_disassemble_bytessL         %   %   *u_disassemble_bytescCstt|ddS(u<Compile the source string, then disassemble the code object.uN(u disassembleu _try_compile(usource((u(/opt/alt/python33/lib64/python3.3/dis.pyu_disassemble_strsu_disassemble_strcCsg}t|}d}x||kr||}|d}|tkr||||dd}|d}d}|tkr||}n|tkr|}n|dkr||kr|j|qqqqW|S(u`Detect all offsets in a byte code which are jump targets. Return the list of offsets. iiiii(ulenu HAVE_ARGUMENTuhasjreluhasjabsuappend(ucodeulabelsunuiuopuopargulabel((u(/opt/alt/python33/lib64/python3.3/dis.pyu findlabelss$           ccst|jddd}t|jddd}d}|j}d}xZt||D]I\}}|r||kr||fV|}n||7}n||7}q]W||kr||fVndS(uFind the offsets in a byte code which are start of lines in the source. Generate pairs (offset, lineno) as described in Python/compile.c. iNii(ulistu co_lnotabuNoneuco_firstlinenouzip(ucodeubyte_incrementsuline_incrementsu lastlinenoulinenouaddru byte_incru line_incr((u(/opt/alt/python33/lib64/python3.3/dis.pyufindlinestartss      cCstjddrrtjddrFtjjdtjdntjd}| sf|dkrxd}qxnd}|dkrtj}n t|}|j}|dk r|j nd}t ||d}t |dS(u*Simple test program to disassemble a file.iNiuusage: python dis.py [-|file] u-uuexec( usysuargvustderruwriteuexituNoneustdinuopenureaducloseucompileudis(ufnufusourceucode((u(/opt/alt/python33/lib64/python3.3/dis.pyu_test%s"        u_testu__main__ii(u__doc__usysutypesuopcodeu__all__u _opcodes_allu MethodTypeu FunctionTypeuCodeTypeutypeu _have_codeu _try_compileuNoneudisudistbuCOMPILER_FLAG_NAMESu pretty_flagsu code_infou_format_code_infou show_codeu disassembleu_disassemble_bytesu_disassemble_strudiscou findlabelsufindlinestartsu_testu__name__(((u(/opt/alt/python33/lib64/python3.3/dis.pyusB    !      3 )