관리-도구
편집 파일: compileall.cpython-35.opt-2.pyc
���]�- � @ s8 d d l Z d d l Z d d l Z d d l Z d d l Z y d d l m Z Wn e k rj d Z Yn Xd d l m Z d d d g Z d d d d d � Z d 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 r4e e � � Z e j e � d S)� N)�ProcessPoolExecutor)�partial�compile_dir�compile_file�compile_path� c c sa | s t d j | � � y t j | � } Wn7 t k re | d k r[ t d j | � � g } Yn X| j � x� | D]� } | d k r� qw t j j | | � } | d k r� t j j | | � } n d } t j j | � s� | Vqw | d k rw | t j k rw | t j k rw t j j | � rw t j j | � rw t | d | d | d d | �Ed Hqw Wd S) NzListing {!r}...� zCan't list {!r}�__pycache__r �ddir� maxlevels� �quiet) �print�format�os�listdir�OSError�sort�path�join�isdir�curdir�pardir�islink� _walk_dir)�dirr r r �names�name�fullname�dfile� r �//opt/alt/python35/lib64/python3.5/compileall.pyr s, *%r Fr c C s | d k r$ | d k r$ t d � � t | d | d | d | �} d } | d k r� | d k r� t d k r� | pu d } t d | � �U } | j t t d | d | d | d | d | d | �| � } t | d d �} Wd QRXn5 x2 | D]* } t | | | | | | | � s� d } q� W| S) Nr z%workers must be greater or equal to 0r r r r �max_workers�force�rx�legacy�optimize�default)� ValueErrorr r �mapr r �min)r r r r# r$ r r% r&