Hacked By AnonymousFox

Current Path : /opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/imp.cpython-35.pyc



��Yf�)�
@s�dZddlmZmZmZmZmZmZmZm	Z	m
Z
yddlmZWnek
rtdZYnXddl
mZmZmZmZddlmZddlmZddlmZddlZddlZddlZddlZddlZddlZejd	ed
d�dZdZdZ d
Z!dZ"dZ#dZ$dZ%dZ&dZ'dd�Z(dd�Z)dd�Z*ddd�Z+dd�Z,dd�Z-Gd d!�d!�Z.Gd"d#�d#�Z/Gd$d%�d%e/ej0�Z1dd&d'�Z2Gd(d)�d)e/e�Z3dd*d+�Z4d,d-�Z5d.d/�Z6dd0d1�Z7d2d3�Z8d4d5�Z9er|dd6d7�Z:ndZ:dS)8z�This module provides the components needed to build your own __import__
function.  Undocumented functions are obsolete.

In most cases it is preferred you consider using the importlib module's
functionality over this module.

�)	�	lock_held�acquire_lock�release_lock�get_frozen_object�is_frozen_package�init_frozen�
is_builtin�	is_frozen�_fix_co_filename)�create_dynamicN)�_ERR_MSG�_exec�_load�_builtin_from_name)�SourcelessFileLoader)�	machinery)�utilzhthe imp module is deprecated in favour of importlib; see the module's documentation for alternative uses�
stacklevel���������	cCs
tj|�S)z_**DEPRECATED**

    Create a new module.

    The module is not entered into sys.modules.

    )�types�
ModuleType)�name�r �(/opt/alt/python35/lib64/python3.5/imp.py�
new_module0sr"cCstjS)z@**DEPRECATED**

    Return the magic number for .pyc files.
    )r�MAGIC_NUMBERr r r r!�	get_magic;sr$cCs
tjjS)z$Return the magic tag for .pyc files.)�sys�implementation�	cache_tagr r r r!�get_tagCsr(c
Cs5tj��"tjd�tj||�SWdQRXdS)a�**DEPRECATED**

    Given the path to a .py file, return the path to its .pyc file.

    The .py file does not need to exist; this simply returns the path to the
    .pyc file calculated as if the .py file were imported.

    If debug_override is not None, then it must be a boolean and is used in
    place of sys.flags.optimize.

    If sys.implementation.cache_tag is None then NotImplementedError is raised.

    �ignoreN)�warnings�catch_warnings�simplefilterr�cache_from_source)�path�debug_overrider r r!r-Hs

r-cCs
tj|�S)a~**DEPRECATED**

    Given the path to a .pyc. file, return the path to its .py file.

    The .pyc file does not need to exist; this simply returns the path to
    the .py file calculated to correspond to the .pyc file.  If path does
    not conform to PEP 3147 format, ValueError will be raised. If
    sys.implementation.cache_tag is None then NotImplementedError is raised.

    )r�source_from_cache)r.r r r!r0[sr0cCsNdd�tjD�}dd�tjD�}dd�tjD�}|||S)z**DEPRECATED**cSsg|]}|dtf�qS)�rb)�C_EXTENSION)�.0�sr r r!�
<listcomp>ks	z get_suffixes.<locals>.<listcomp>cSsg|]}|dtf�qS)�r)�	PY_SOURCE)r3r4r r r!r5ls	cSsg|]}|dtf�qS)r1)�PY_COMPILED)r3r4r r r!r5ms	)r�EXTENSION_SUFFIXES�SOURCE_SUFFIXES�BYTECODE_SUFFIXES)�
extensions�source�bytecoder r r!�get_suffixesisr?c@s.eZdZdZdd�Zdd�ZdS)�NullImporterz-**DEPRECATED**

    Null import object.

    cCsI|dkr!tddd��n$tjj|�rEtdd|��dS)N�zempty pathnamer.zexisting directory)�ImportError�osr.�isdir)�selfr.r r r!�__init__zszNullImporter.__init__cCsdS)zAlways returns None.Nr )rE�fullnamer r r!�find_module�szNullImporter.find_moduleN)�__name__�
__module__�__qualname__�__doc__rFrHr r r r!r@rsr@cs=eZdZdZd�fdd�Z�fdd�Z�S)�_HackedGetDatazMCompatibility support for 'file' arguments of various load_*()
    functions.Ncs t�j||�||_dS)N)�superrF�file)rErGr.rO)�	__class__r r!rF�sz_HackedGetData.__init__c	sx|jrd||jkrd|jjs0|j}nt|jd�|_}|�|j�SWdQRXnt�j|�SdS)z;Gross hack to contort loader to deal w/ load_*()'s bad API.r6N)rOr.�closed�open�readrN�get_data)rEr.rO)rPr r!rT�sz_HackedGetData.get_data)rIrJrKrLrFrTr r )rPr!rM�srMc@seZdZdZdS)�_LoadSourceCompatibilityz5Compatibility support for implementing load_source().N)rIrJrKrLr r r r!rU�srUcCs�t|||�}tj||d|�}|tjkrRt|tj|�}nt|�}tj||�|_	|j	|j
_|S)N�loader)rUr�spec_from_file_locationr%�modulesr
rr�SourceFileLoader�
__loader__�__spec__rV)r�pathnamerOrV�spec�moduler r r!�load_source�sr_c@seZdZdZdS)�_LoadCompiledCompatibilityz7Compatibility support for implementing load_compiled().N)rIrJrKrLr r r r!r`�sr`cCs�t|||�}tj||d|�}|tjkrRt|tj|�}nt|�}t||�|_|j|j	_
|S)z**DEPRECATED**rV)r`rrWr%rXr
rrrZr[rV)rr\rOrVr]r^r r r!�
load_compiled�sracCs�tjj|�r�tjdd�tjdd�}xU|D]8}tjj|d|�}tjj|�r=|}Pq=Wtdj	|���t
j||dg�}|tj
kr�t|tj
|�St|�SdS)z**DEPRECATED**NrFz{!r} is not a package�submodule_search_locations)rCr.rDrr:r;�join�exists�
ValueError�formatrrWr%rXr
r)rr.r<�	extensionZ	init_pathr]r r r!�load_package�s
	rhc	Cs�|\}}}|rI|jd
�s1d|krItdj|���n@|dkr�|tthkr�dj|�}t|��n|tkr�t|||�S|tkr�t|||�S|tkr tdk	r |dkr
t	|d��}t|||�SWdQRXq�t|||�Sni|t
kr9t||�S|tkrOt
|�S|tkret|�Sdj||�}t|d	|��dS)z�**DEPRECATED**

    Load a module, given information returned by find_module().

    The module name must include the full package name, if any.

    r6�U�+zinvalid file open mode {!r}Nz.file object required for import (type code {})r1z*Don't know how to import {} (type code {})r)r6ri)�
startswithrerfr7r8r_rar2�load_dynamicrR�
PKG_DIRECTORYrh�	C_BUILTIN�init_builtin�	PY_FROZENrrB)	rrO�filenameZdetails�suffix�mode�type_�msgZopened_filer r r!�load_module�s."


rvcCs!t|t�s-tdjt|����n6t|td�tf�sctdjt|����|dkr�t|�r�ddddtffSt	|�r�ddddt
ffStj}x�|D]�}t
jj||�}xbdtjdgD]M}d|}t
jj||�}t
jj|�r�d|ddtffSq�WxOt�D]A\}}}||}	t
jj||	�}t
jj|�rMPqMWq�Pq�Wttj|�d|��d}
d	|kr�t|d
��}tj|j�d}
WdQRXt||d|
�}|||||ffS)a,**DEPRECATED**

    Search for a module.

    If path is omitted or None, search for a built-in, frozen or special
    module and continue search in sys.path. The module name cannot
    contain '.'; to search for a submodule of a package, pass the
    submodule name and the package's __path__.

    z'name' must be a str, not {}Nz%'path' must be None or a list, not {}rAz.pyrrFr�br1�encoding)�
isinstance�str�	TypeErrorrf�type�list�RuntimeErrorrrnr	rpr%r.rCrcrr;�isfilermr?rBrrR�tokenize�detect_encoding�readline)rr.�entryZpackage_directoryrrZpackage_file_nameZ	file_pathrsrt�	file_namerxrOr r r!rH�s@		


rHcCs
tj|�S)zw**DEPRECATED**

    Reload the module and return it.

    The module must have been successfully imported before.

    )�	importlib�reload)r^r r r!r�3sr�cCs+yt|�SWntk
r&dSYnXdS)zl**DEPRECATED**

    Load and return a built-in module by name, or None is such module doesn't
    exist
    N)rrB)rr r r!ro>s
rocCsLddl}|jj||�}|jjd|d|d|�}t|�S)z:**DEPRECATED**

        Load an extension module.
        rNrrV�origin)�importlib.machineryr�ExtensionFileLoader�
ModuleSpecr)rr.rOr�rVr]r r r!rlKs
rl);rL�_imprrrrrrrr	r
rrBZimportlib._bootstraprr
rrZimportlib._bootstrap_externalrr�rrrCr%r�rr*�warn�PendingDeprecationWarningZSEARCH_ERRORr7r8r2ZPY_RESOURCErmrnrpZPY_CODERESOURCEZIMP_HOOKr"r$r(r-r0r?r@rMrYrUr_r`rarhrvrHr�rorlr r r r!�<module>s^@
"	
	#4

Hacked By AnonymousFox1.0, Coded By AnonymousFox