PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  xfc@sdZdZddddgZddlZddlZejdZeZd Z d Z d Z d Z d Z e ddZedkrxedgD] ZeGHqWdGHx%edgde D] ZeGHqWndS(sCList python source files. There are three functions to check whether a file is a Python source, listed here with increasing complexity: - has_python_ext() checks whether a file name ends in '.py[w]'. - look_like_python() checks whether the file is not binary and either has the '.py[w]' extension or the first line contains the word 'python'. - can_be_compiled() checks whether the file can be compiled by compile(). The file also must be of appropriate size - not bigger than a megabyte. walk_python_files() recursively lists all Python files under the given directories. sOleg Broytmann, Georg Brandlthas_python_exttlooks_like_pythontcan_be_compiledtwalk_python_filesiNs [--]cCstr|GHndS(N(tdebug(tmsg((s./usr/lib64/python2.7/Tools/scripts/pysource.pyt print_debugscCsytj|j}Wn(tk r@}td||fdSX|dkretd||fdSyt|dSWn(tk r}td||fdSXdS(Ns%s: permission denied: %sis!%s: the file is too big: %d bytestrUs%s: access denied: %si(toststattst_sizetOSErrorRtNonetopentIOError(tfullpathtsizeterr((s./usr/lib64/python2.7/Tools/scripts/pysource.pyt_open!s cCs|jdp|jdS(Ns.pys.pyw(tendswith(R((s./usr/lib64/python2.7/Tools/scripts/pysource.pyR2scCst|}|dkrtS|j}|jtj|rStd|tS|jdsq|jdrut Sd|krt StS(Ns%s: appears to be binarys.pys.pywtpython( RR tFalsetreadlinetcloset binary_retsearchRRtTrue(Rtinfiletline((s./usr/lib64/python2.7/Tools/scripts/pysource.pyR5s     cCsut|}|dkrtS|j}|jyt||dWn(tk rp}td||ftSXtS(Ntexecs%s: cannot compile: %s( RR RtreadRtcompilet ExceptionRR(RRtcodeR((s./usr/lib64/python2.7/Tools/scripts/pysource.pyRJs    c cs"|dkrg}nx|D]}td|tjj|rY||r|Vqqtjj|rtdxtj|D]\}}}x*|D]"}||kr|j|qqWxE|D]=}tjj||} td| || r| VqqWqWqtdqWdS(s^ Recursively yield all Python source files below the given paths. paths: a list of files and/or directories to be checked. is_python: a function that takes a file name and checks whether it is a Python source file exclude_dirs: a list of directory base names that should be excluded in the search s testing: %ss it is a directorys unknown typeN( R RRtpathtisfiletisdirtwalktremovetjoin( tpathst is_pythont exclude_dirsR"tdirpathtdirnamest filenamestexcludetfilenameR((s./usr/lib64/python2.7/Tools/scripts/pysource.pyR[s&          t__main__t.s ----------R)(t__doc__t __author__t__all__RtreRRRRRRRRRR Rt__name__R(((s./usr/lib64/python2.7/Tools/scripts/pysource.pyts"     !