file_get_contents
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
lib64
/
python2.7
/
Filename :
imputil.pyo
back
Copy
� zfc�����������@���sZ��d��Z��d�d�l�m�Z�e�d�d�d��[�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�e �d ���Z �e �e���Z�d�d�d�������YZ�d�d�d�������YZ �e�r��d �p��d�Z�d�e�Z�d����Z�d�a�a�d����Z�d����Z�d����Z�d �e �f�d�������YZ�d�e �f�d�������YZ�d����Z�d�d�d�������YZ�d����Z�d����Z�d�S(���s�� Import utilities Exported classes: ImportManager Manage the import process Importer Base class for replacing standard import functions BuiltinImporter Emulate the import mechanism for builtin and frozen modules DynLoadSuffixImporter i����(���t���warnpy3ks1���the imputil module has been removed in Python 3.0t ���stackleveli���Nt ���ImportManagert���Importert���BuiltinImportert����c�����������B���sq���e��Z�d��Z�e�e���d���Z�d����Z�d����Z�d �Z �d �d���Z �d �d �d �d���Z�d����Z�d����Z �d����Z�RS( ���s���Manage the import process.c���������C���sE���t��|�t���r�t�|���}�n��|�d�|��_�|�|��_�|��j�|�d�<d�S(���s8���Install this ImportManager into the specified namespace.t ���__import__N(���t ���isinstancet���_ModuleTypet���varst���previous_importert ���namespacet���_import_hook(���t���selfR���(����(����s���/usr/lib64/python2.7/imputil.pyt���install!���s ���� c���������C���s���|��j��|��j�d�<d�S(���s&���Restore the previous import mechanism.R���N(���R ���R���(���R ���(����(����s���/usr/lib64/python2.7/imputil.pyt ���uninstall1���s����c���������C���s���|��j��j�|�|���d��S(���N(���t���fs_impt ���add_suffix(���R ���t���suffixt ���importFunc(����(����s���/usr/lib64/python2.7/imputil.pyR���5���s����c���������C���s����t��s�t����n��|�d��k�r7�|��j�p(�t�}�|����}�n��|�|��_�xG�t�j����D]9�}�|�d�t�j�k�rM�|��j �|�d�t �|���j���qM�qM�W|��j �d�t���d��S(���Ni���i����s���.py( ���t���_os_statt ���_os_bootstrapt���Nonet���clsFilesystemImportert���_FilesystemImporterR���t���impt���get_suffixest���C_EXTENSIONR���t���DynLoadSuffixImportert���import_filet���py_suffix_importer(���R ���R���t���clst���desc(����(����s���/usr/lib64/python2.7/imputil.pyt���__init__@���s���� c��� ������C���sS��|�j��d���}�|��j�|���}�|�rI�|�j�j�|�|�|���}�|�rI�|�Sn��y�t�j�|�d�}�Wn:�t�k �r��|��j�|�d���}�|�s��t�d�|���q��n�Xt �|���d�k�r��|�s��|�S|�j �j�d���s��|�Sn��|�j �j�d���} �| �r��| �j�|�|�d�|���St �|���d�k�rBt �|�|�d���rB|�r;t�|�|�d���S|�Sn��t�d�|���d�S( ���s5���Python calls this hook to locate and import a module.t���.i����s���No module named i���t ���__ispkg__t���__importer__i���N(���t���splitt���_determine_import_contextR$���t ���_do_importt���syst���modulest���KeyErrort���_import_top_modulet���ImportErrort���lent���__dict__t���gett���_finish_importt���hasattrt���getattr( ���R ���t���fqnamet���globalst���localst���fromlistt���partst���parentt���modulet ���top_modulet���importer(����(����s���/usr/lib64/python2.7/imputil.pyR���V���s2���� %c���������C���sz���|�s�|�j��d���r�d�S|�d�}�|�d�r@�t�j�|�}�|�S|�j�d���}�|�d�k�r_�d�S|�|� }�t�j�|�}�|�S(���sJ��Returns the context in which a module should be imported. The context could be a loaded (package) module and the imported module will be looked for within that package. The context could also be None, meaning there is no context -- the module should be looked for as a "top-level" module. R$���t���__name__R#���R"���i����N(���R/���R���R(���R)���t���rfind(���R ���R4���t ���parent_fqnameR8���t���i(����(����s���/usr/lib64/python2.7/imputil.pyR&�������s���� c���������C���sX���xQ�t��j�D]F�}�t�|�t���r7�|��j�j�|�|���}�n�|�j�|���}�|�r �|�Sq �Wd��S(���N(���R(���t���pathR���t���_StringTypeR���t���import_from_dirt ���import_topR���(���R ���t���namet���itemR9���(����(����s���/usr/lib64/python2.7/imputil.pyR+�������s����c���������C���s(���|�j��j�d���}�|�s�n��t�d���d�S(���s*���Python calls this hook to reload a module.R$���s���reload not yet implementedN(���R.���R/���t���SystemError(���R ���R9���R;���(����(����s���/usr/lib64/python2.7/imputil.pyt���_reload_hook����s����N(���R<���t ���__module__t���__doc__R ���t���__builtin__R���R���R���R���R���R!���R���R&���R+���RG���(����(����(����s���/usr/lib64/python2.7/imputil.pyR������s��� ? ' c�����������B���sV���e��Z�d��Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z �d����Z �RS( ���s3���Base class for replacing standard import functions.c���������C���s���|��j��d�|�|���S(���s���Import a top-level module.N(���t���_import_oneR���(���R ���RD���(����(����s���/usr/lib64/python2.7/imputil.pyRC�������s����c���������C���s<���|��j��|�|���}�|�s�|�S|�j�r8�|��j�|�|���n��|�S(���N(���t ���_load_tailR#���t���_import_fromlist(���R ���t���topR7���R6���t���bottom(����(����s���/usr/lib64/python2.7/imputil.pyR0�������s���� c���������C���sw���y�t��j�|�SWn�t�k �r"�n�X|��j�|�|�|���}�|�d�k�rH�d�S|��j�|�|���}�|�rs�t�|�|�|���n��|�S(���s���Import a single module.N(���R(���R)���R*���t���get_codeR���t���_process_resultt���setattr(���R ���R8���t���modnameR3���t���resultR9���(����(����s���/usr/lib64/python2.7/imputil.pyRK�����s���� c���������B���s����|�\�}�}�}�e��|�e���}�|�r-�|�}�n�e�j�|���}�|��|�_�|�|�_�|�j�j�|���|�e�j �|�<|�s��y�|�|�j�UWq��|�e�j �k�r��e�j �|�=n�����q��Xn��e�j �|�}�|�|�_ �|�S(���N(���R���R���R���t ���new_moduleR$���R#���R.���t���updateR(���R)���R<���(���R ���RT���R3���t���ispkgt���codet���valuest ���is_moduleR9���(����(����s���/usr/lib64/python2.7/imputil.pyRQ�����s&���� c���������C���sS���xL�|�D]D�}�d�|�j��|�f�}�|��j�|�|�|���}�|�s�t�d�|���q�q�W|�S(���s����Import the rest of the modules, down from the top-level module. Returns the last module in the dotted list of modules. s���%s.%ss���No module named (���R<���RK���R,���(���R ���t���mR7���t���partR3���(����(����s���/usr/lib64/python2.7/imputil.pyRL���A��s���� c���������C���s����d�|�k�r4�t��|���t��|�j�j�d�g������}�n��xk�|�D]c�}�|�d�k�r;�t�|�|���r;�d�|�j�|�f�}�|��j�|�|�|���}�|�s��t�d�|���q��q;�q;�Wd�S(���s*���Import any sub-modules in the "from" list.t���*t���__all__s���%s.%ss���cannot import name N(���t���listR.���R/���R1���R<���RK���R,���(���R ���t���packageR6���t���subt���subnamet���submod(����(����s���/usr/lib64/python2.7/imputil.pyRM���M��s���� c���������C���sQ���|�d�}�|�j��d�|�}�|��j�|�|�|���}�|�s:�d�S|��j�|�|�d�|���S(���s����Attempt to import the module relative to parent. This method is used when the import context specifies that <self> imported the parent module. i����R"���i���N(���R<���RK���R���R0���(���R ���R8���R7���R6���t���top_namet ���top_fqnameR:���(����(����s���/usr/lib64/python2.7/imputil.pyR'���_��s���� c���������C���s ���t��d���d�S(���s���Find and retrieve the code for the given module. parent specifies a parent module to define a context for importing. It may be None, indicating no particular context for the search. modname specifies a single module (not dotted) within the parent. fqname specifies the fully-qualified module name. This is a (potentially) dotted name from the "root" of the module namespace down to the modname. If there is no parent, then modname==fqname. This method should return None, or a 3-tuple. * If the module was not found, then None should be returned. * The first item of the 2- or 3-tuple should be the integer 0 or 1, specifying whether the module that was found is a package or not. * The second item is the code object for the module (it will be executed within the new module's namespace). This item can also be a fully-loaded module object (e.g. loaded from a shared lib). * The third item is a dictionary of name/value pairs that will be inserted into new module before the code object is executed. This is provided in case the module's code expects certain values (such as where the module was found). When the second item is a module object, then these names/values will be inserted *after* the module has been loaded/initialized. s���get_code not implementedN(���t���RuntimeError(���R ���R8���RS���R3���(����(����s���/usr/lib64/python2.7/imputil.pyRP���r��s����(���R<���RH���RI���RC���R0���RK���RQ���RL���RM���R'���RP���(����(����(����s���/usr/lib64/python2.7/imputil.pyR�������s��� # % t���ct���os���.pyc���������C���s����t��|��d���j����}�|�r8�|�d�d�k�r8�|�d�}�n��t�j�|�|��d���}�y�t��|��t�d���}�Wn�t�k �rw�nn�X|�j�d���|�j�t�j�d�|�����t �j �|�|���|�j����|�j�d�d���|�j�t �j������|�j����|�S( ���sN��Compile (and cache) a Python source file. The file specified by <pathname> is compiled to a code object and returned. Presuming the appropriate privileges exist, the bytecodes will be saved back to the filesystem for future imports. The source file's modification timestamp must be provided as a Long value. t���rUi����s��� t���exect���wbs�������s���<Ii����(���t���opent���readRJ���t���compilet���_suffix_chart���IOErrort���writet���structt���packt���marshalt���dumpt���flusht���seekR���t ���get_magict���close(���t���pathnamet ���timestampt ���codestringRX���t���f(����(����s���/usr/lib64/python2.7/imputil.pyt���_compile���s ���� c����������C���s����t��j�}��d�}�d�|��k�r4�d�}�d�d�l�m�}�nx�d�|��k�rY�d�}�d�d�l�m�}�nS�d�|��k�r~�d�}�d�d�l�m�}�n.�d�|��k�r��d�}�d�d�l�m�}�n �t�d ���|�d�k�r��|�d ���}�n��|�a �|�a �d�S(���sI���Set up 'os' module replacement functions for use during import bootstrap.t���posixt���/i����(���t���statt���nts���\t���dost���os2s���no os specific module foundc���������S���sF���|��d�k�r�|�S|��d�}�|�d�k�s2�|�|�k�r:�|��|�S|��|�|�S(���NR���i����R����(����(���t���at���bt���sept���lastchar(����(����s���/usr/lib64/python2.7/imputil.pyt���join���s���� N(���R(���t���builtin_module_namesR���R���R����R����R����R����R,���R���t ���_os_path_join(���t���namesR����R����R����(����(����s���/usr/lib64/python2.7/imputil.pyR������s&���� c���������C���s6���y�t��|����}�Wn�t�k �r$�d�SX|�j�d�@d�k�S(���s&���Local replacement for os.path.isdir().i����i�@��N(���R���t���OSErrorR���t���st_mode(���Rz���t���s(����(����s���/usr/lib64/python2.7/imputil.pyt���_os_path_isdir���s ���� c���������C���s2���y�t��|����}�Wn�t�k �r$�d�SXt�|�j���S(���s,���Return the file modification time as a Long.N(���R���R����R���t���longt���st_mtime(���Rz���R����(����(����s���/usr/lib64/python2.7/imputil.pyt ���_timestamp���s ���� c�����������B���s���e��Z�d�����Z�RS(���c���������C���sr���|�r �d��St�j�|���r%�t�j�}�n�t�j�|���r@�t�j�}�n�d��St�j�|�d��|�d�d�|�f���}�d�|�i��f�S(���NR���i����(���R���R���t ���is_builtint ���C_BUILTINt ���is_frozent ���PY_FROZENt���load_module(���R ���R8���RS���R3���t���typeR9���(����(����s���/usr/lib64/python2.7/imputil.pyRP������s����!(���R<���RH���RP���(����(����(����s���/usr/lib64/python2.7/imputil.pyR������s���R���c�����������B���s5���e��Z�d�����Z�d����Z�d����Z�d����Z�d����Z�RS(���c���������C���s ���g��|��_��d��S(���N(���t���suffixes(���R ���(����(����s���/usr/lib64/python2.7/imputil.pyR!�����s����c���������C���s���|��j��j�|�|�f���d��S(���N(���R����t���append(���R ���R���R���(����(����s���/usr/lib64/python2.7/imputil.pyR�����s����c���������C���s5���|��j��t�|�|���|���}�|�r1�|��j�|�|���Sd��S(���N(���t���_import_pathnameR����RQ���R���(���R ���t���dirR3���RT���(����(����s���/usr/lib64/python2.7/imputil.pyRB�����s����c���������C���s[���x<�|�j��D]1�}�|��j�t�|�|���|���}�|�d��k �r �|�Sq �W|��j�t�|�j�|���|���S(���N(���t���__path__R����R����R���t ���__pkgdir__(���R ���R8���RS���R3���t���submodule_pathRX���(����(����s���/usr/lib64/python2.7/imputil.pyRP�����s����c��� ������C���s����t��|���rc�|��j�t�|�d���|���}�|�r_�|�d�}�|�|�d�<|�g�|�d�<d�|�d�|�f�Sd��SxU�|��j�D]J�\�}�}�|�|�}�y�t�|���}�Wn�t�k �r��qm�X|�|�|�|���Sqm�Wd��S(���NR!���i���R����R����i���(���R����R����R����R���R����R���R����( ���R ���Rz���R3���RT���RY���R���R���t���filenamet���finfo(����(����s���/usr/lib64/python2.7/imputil.pyR����,��s"���� (���R<���RH���R!���R���RB���RP���R����(����(����(����s���/usr/lib64/python2.7/imputil.pyR�����s ��� c��� ������C���s����|��d� t��}�t�|�d���}�t�|���}�d��}�|�d��k �r��|�|�k�r��t�|�d���}�|�j�d���t�j����k�r��t�j �d�|�j�d�����d�}�|�|�k�r��t �j�|���}�q��n��|�j����n��|�d��k�r��|��}�t �|�|���}�n��d�|�i�|�d�6f�S(���Ni����i���t���rbi���s���<Ii����t���__file__(���t���_suffixR����R����R���Rl���Rm���R���Rx���Rr���t���unpackRt���t���loadRy���R~���( ���R����R����R3���t���filet���t_pyt���t_pycRX���R}���t���t(����(����s���/usr/lib64/python2.7/imputil.pyR���F��s���� R���c�����������B���s���e��Z�d�����Z�d����Z�RS(���c���������C���s ���|�|��_��d��S(���N(���R ���(���R ���R ���(����(����s���/usr/lib64/python2.7/imputil.pyR!���Z��s����c���������C���sG���t��|�|��j�d���}�t�j�|�|�|�|��j���}�|�|�_�d�|�i��f�S(���Ni���i����(���Rl���R ���R���R����R����(���R ���R����R����R3���t���fpR9���(����(����s���/usr/lib64/python2.7/imputil.pyR���]��s���� (���R<���RH���R!���R���(����(����(����s���/usr/lib64/python2.7/imputil.pyR���Y��s��� c����������C���s^���t��j�j����}��|��j����x>�|��D]6�\�}�}�|�rM�|�G|�j�j�d�d���GHq �|�Gd�GHq �Wd��S(���NR$���s���-- no importers���-- non-existent module(���R(���R)���t���itemst���sortR.���R/���(���R����RD���R9���(����(����s���/usr/lib64/python2.7/imputil.pyt���_print_importersf��s���� c�����������C���s'���t�����j����t�j�j�d�t������d��S(���Ni����(���R���R���R(���R@���t���insertR���(����(����(����s���/usr/lib64/python2.7/imputil.pyt���_test_revampo��s���� (����(����(����(���RI���t���warningsR����R���R(���RJ���Rr���Rt���R^���R����RA���R���R���R���t ���__debug__Ro���R����R~���R���R���R����R���R����R����R���R���R���R���R����R����(����(����(����s���/usr/lib64/python2.7/imputil.pyt���<module>���s4����� $ 6