ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ fc@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"     !