OwlCyberSecurity - MANAGER
Edit File: findnocoding.pyc
� �fc�����������@���s���d��Z��d�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�y�d�d�l�Z�Wn:�e�k �r��d�d�d�������YZ�e����Z�e�j�d�IJn�Xe�j �d���Z �e�j �d���Z�d ����Z�d ����Z �d����Z�d�e�j�d �Z�y#�e�j�e�j�d�d���\�Z�Z�Wn=�e�j�k �r5Z�e�j�e�IJe�j�e�IJe�j�d���n�Xe�j�Z�e�Z�xA�e�D]9�\�Z�Z�e�d�k�rpe�j�Z�qLe�d�k�rLe�Z�qLqLWe�s�e�j�e�IJe�j�d���n��xF�e�j�e�e���D]2�Z�e�r�d�e�GHn��e�e���Z �e �r�e�GHq�q�Wd�S(���s_���List all those Python files that require a coding directive Usage: nocoding.py dir1 [dir2...] s���Oleg Broytmann, Georg Brandli����Nt���pysourcec�����������B���s���e��Z�d�Z�Z�Z�d�����Z�RS(���c��� ������o���s����x��|�D]��}�t��j�j�|���r0�|�j�d���Vq�t��j�j�|���r�xZ�t��j�|���D]F�\�}�}�}�x4�|�D],�}�|�j�d���rh�t��j�j�|�|���Vqh�qh�WqR�Wq�q�Wd��S(���Ns���.py(���t���ost���patht���isfilet���endswitht���isdirt���walkt���join( ���t���selft���pathst���argst���kwargsR���t���roott���dirst���filest���filename(����(����s2���/usr/lib64/python2.7/Tools/scripts/findnocoding.pyt���walk_python_files���s���� N(���t���__name__t ���__module__t���Nonet���has_python_extt���looks_like_pythont���can_be_compiledR���(����(����(����s2���/usr/lib64/python2.7/Tools/scripts/findnocoding.pyR�������s���s^���The pysource module is not available; no sophisticated Python source file search will be done.s&���^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)s���^[ \t\f]*(?:[#\r\n]|$)c���������C���s&���t��j�|����}�|�r"�|�j�d���Sd�S(���Ni���t����(���t���decl_ret���matcht���group(���t���lineR���(����(����s2���/usr/lib64/python2.7/Tools/scripts/findnocoding.pyt���get_declaration&���s���� c���������C���s.���y�t��|��|���Wn�t�k �r%�t�SXt�Sd��S(���N(���t���unicodet���UnicodeDecodeErrort���Falset���True(���t���textt���codec(����(����s2���/usr/lib64/python2.7/Tools/scripts/findnocoding.pyt���has_correct_encoding,���s ���� c���������C���s����y�t��|��d���}�Wn�t�k �r'�d��SX|�j����}�|�j����}�t�|���sg�t�j�|���ru�t�|���ru�|�j����t�S|�j ����}�|�j����t �|�|�|�d���r��t�St�S(���Nt���rUt���ascii(���t���opent���IOErrorR���t���readlineR���t���blank_reR���t���closeR���t���readR#���R ���(���t���fullpatht���infilet���line1t���line2t���rest(����(����s2���/usr/lib64/python2.7/Tools/scripts/findnocoding.pyt���needs_declaration4���s���� sj���Usage: %s [-cd] paths... -c: recognize Python source files trying to compile them -d: debug outputi����i���t���cds���-cs���-ds���Testing for coding: %s(����(!���t���__doc__t ���__author__t���sysR���t���ret���getoptR����t���ImportErrort���stderrt���compileR���R)���R���R#���R1���t���argvt���usaget���optsR ���t���errort���msgt���exitR���t ���is_pythonR���t���debugt���ot���aR���R ���R���R,���t���result(����(����(����s2���/usr/lib64/python2.7/Tools/scripts/findnocoding.pyt���<module>���sH���0 #