관리-도구
편집 파일: compileall.cpython-34.pyo
� e f�% � @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d d g Z d d d d d d d d d � Z d d d d d d d d � Z d d d d d d d d � Z d d � Z e d k r� e e � � Z e j e � n d S)a� Module/script to byte-compile all .py files to .pyc (or .pyo) files. When called as a script with arguments, this compiles the directories given as arguments recursively; the -l option prevents it from recursing into directories. Without arguments, if compiles all modules on sys.path, without recursing into subdirectories. (Even though it should do so for packages -- for now, you'll have to deal with packages separately.) See module py_compile for details of the actual byte-compilation. � N�compile_dir�compile_file�compile_path� F� c C s� | s t d j | � � n y t j | � } Wn+ t k r\ t d j | � � g } Yn X| j � d } x| D]} | d k r� qt n t j j | | � } | d k r� t j j | | � } n d } t j j | � st | | | | | | | � s�d } q�qt | d k rt | t j k rt | t j k rt t j j | � rt t j j | � rt t | | d | | | | | | � s�d } q�qt qt W| S)a[ Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: the directory that will be prepended to the path to the file as it is compiled into each byte-code file. force: if True, force compilation, even if timestamps are up-to-date quiet: if True, be quiet during compilation legacy: if True, produce legacy pyc paths instead of PEP 3147 paths optimize: optimization level or -1 for level of the interpreter zListing {!r}...zCan't list {!r}r �__pycache__Nr )�print�format�os�listdir�OSError�sort�path�join�isdirr �curdir�pardir�islinkr ) �dir� maxlevels�ddir�force�rx�quiet�legacy�optimize�names�success�name�fullname�dfile� r! �//opt/alt/python34/lib64/python3.4/compileall.pyr s4 *%c C s d } t j j | � } | d k r<