%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/alembic/util/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python37/lib/python3.7/site-packages/alembic/util/__pycache__/pyfiles.cpython-37.pyc

B

�M!V�
�@shddlZddlZddlZddlmZmZddlmZdd�Zdd�Z	d	d
�Z
dd�Zd
d�Zdd�Z
dS)�N�)�load_module_py�load_module_pyc)�Templatec	Ks<t|d��(}t|d�}|�|jf|��|��WdQRXdS)N�wb)�filename)�openr�writeZrender_unicode�encode)Z
template_file�destZoutput_encoding�kw�f�template�r�/pyfiles.py�template_to_files
rcCs0tj�|�s,d|kr,ddl}|j|�d��}|S)z�Interpret a filename as either a filesystem location or as a package
    resource.

    Names that are non absolute paths and contain a colon
    are interpreted as resources and coerced to a file location.

    �:rN)�os�path�isabs�
pkg_resourcesZresource_filename�split)Zfnamerrrr�coerce_resource_to_filenamesrcCstjjr|dS|dSdS)a6Given a python source path, return the so-called
    "sourceless" .pyc or .pyo path.

    This just a .pyc or .pyo file where the .py file would be.

    Even with PEP-3147, which normally puts .pyc/.pyo files in __pycache__,
    this use case remains supported as a so-called "sourceless module import".

    �o�cN)�sys�flags�optimize)rrrr�simple_pyc_file_from_paths
rcCs,ddl}t|d�}|r |�|�St|�SdS)z�Given a python source path, locate the .pyc.

    See http://www.python.org/dev/peps/pep-3147/
                        #detecting-pep-3147-availability
        http://www.python.org/dev/peps/pep-3147/#file-extension-checks

    rNZget_tag)�imp�hasattr�cache_from_sourcer)rrZhas3147rrr�pyc_file_from_path.s


r"c
CsXddl}ddlm}y|�|�Wn0tk
rR}z|d|f��Wdd}~XYnXdS)z*Given a source path, run the EDITOR for itrNr)�CommandErrorzError executing editor (%s))�editor�r#�edit�	Exception)rr$r#�excrrrr&>sr&cCs�t�dd|�}tj�||�}tj�|�\}}|dkrztj�|�rLt||�}q�tj�t|��rlt	|t|��}q�t
d|��n|dkr�t	||�}tj|=|S)z3Load a file from the given path as a Python module.z\W�_z.pyzCan't find Python file %s)z.pycz.pyo)
�re�subrr�join�splitext�existsrrr�ImportErrorr�modules)Zdir_rZ	module_idrr)Zext�modulerrr�load_python_fileIs
r2)rrr*�compatrrZ
mako.templaterrrrr"r&r2rrrr�<module>s

Zerion Mini Shell 1.0