관리-도구
편집 파일: py_compile.cpython-36.opt-2.pyc
3 \ � @ s~ d dl Zd dlZd dlZd dlZd dlZd dlZd dlZdddgZG dd� de �Z ddd�Zd d d�Ze d krzeje� � dS )� N�compile�main�PyCompileErrorc @ s e Zd Zddd�Zdd� ZdS )r � c C st |j }|tkr2djtj||��}|jdd| �}nd||f }tj| |pJ||||� || _|| _ || _ |pl|| _d S )Nr zFile "<string>"z File "%s"z Sorry: %s: %s)�__name__�SyntaxError�join� traceback�format_exception_only�replace� Exception�__init__� exc_type_name� exc_value�file�msg)�self�exc_typer r r r �tbtext�errmsg� r �"/usr/lib64/python3.6/py_compile.pyr - s zPyCompileError.__init__c C s | j S )N)r )r r r r �__str__= s zPyCompileError.__str__N)r )r � __module__�__qualname__r r r r r r r s F� c C s� |d kr>|dkr2|dkr|nd}t jj| |d�}nt jj| �}tjj|�r^d}t|j|���n,tjj|�r�tjj |� r�d}t|j|���t j jd| �}|j| �}y|j ||p�| |d�} W nV tk �r } z8t| j| |p�| �}|r�|�ntjj|jd � d S W Y d d } ~ X nX y tjj|�}|�r0tj|� W n tk �rH Y nX |j| �} t jj| | d | d �}t jj| �}t jj|||� |S )Nr r r )�optimizationzc{} is a symlink and will be changed into a regular file if import writes a byte-compiled file to itzk{} is a non-regular file and will be changed into a regular one if import writes a byte-compiled file to itz<py_compile>)� _optimize� �mtime�size)� importlib�util�cache_from_source�os�path�islink�FileExistsError�format�exists�isfile� machinery�SourceFileLoader�get_data�source_to_coder r � __class__�sys�stderr�writer �dirname�makedirs� path_stats�_bootstrap_external�_code_to_bytecode� _calc_mode� _write_atomic)r �cfile�dfile�doraise�optimizer r �loader�source_bytes�code�err�py_excr3 �source_stats�bytecode�moder r r r A sF ) c C s" | d krt jdd � } d}| dgkr�x�t jj� }|s6P |jd�}yt|dd� W q& tk r� } zd}t jjd|j � W Y d d }~X q& t k r� } zd}t jjd| � W Y d d }~X q&X q&W nZxX| D ]P}yt|dd� W q� tk �r } zd}t jjd|j � W Y d d }~X q�X q�W |S )Nr r �-r T)r<