b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/imputil.pyc
Size15.66 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:28
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc @s\dZddklZeddd�[ddkZddkZddkZddkZddkZddd gZe d
�Z
e e�Z ddd ��YZ ddd ��YZ
eod
pdZdeZd�Zdaad�Zd�Zd�Zd e
fd��YZde
fd��YZd�Zddd��YZd�Zd�ZdS(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ÿÿÿÿ(twarnpy3ks1the imputil module has been removed in Python 3.0t
stackleveliNt
ImportManagertImportertBuiltinImportertcBsqeZdZee�d�Zd�Zd�Zd Z d d�Z
d d d d�Z d�Z d�Z
d�ZRS(
sManage the import process.cCsGt|t�ot|�}n|d|_||_|i|d<dS(s8Install this ImportManager into the specified namespace.t
__import__N(t
isinstancet _ModuleTypetvarstprevious_importert namespacet _import_hook(tselfR ((s/usr/lib64/python2.6/imputil.pytinstall!s

 cCs|i|id<dS(s&Restore the previous import mechanism.RN(R
R (R
((s/usr/lib64/python2.6/imputil.pyt uninstall1scCs+t|�pt�|ii||�dS(N(tcallabletAssertionErrortfs_impt
add_suffix(R
tsuffixt
importFunc((s/usr/lib64/python2.6/imputil.pyR5scCs¥tp t�n|djo|ipt}|�}n||_xIti�D];}|dtijo!|i |dt
|�i �qRqRW|i dt �dS(Niis.py(
t_os_statt
_os_bootstraptNonetclsFilesystemImportert_FilesystemImporterRtimpt get_suffixest C_EXTENSIONRtDynLoadSuffixImportert import_filetpy_suffix_importer(R
Rtclstdesc((s/usr/lib64/python2.6/imputil.pyt__init__@s 

 

c
Csh|id�}|i|�}|o(|ii|||�}|o|Snyti|d}Wn>tj
o2|i|d�}|ptd|�q£nXt |�djo(|p|S|i
i d�p|Sn|i
i d�} | o| i ||d|�St |�djo5t
||d�o!|ot||d�S|Sntd|�dS( s5Python calls this hook to locate and import a module.t.isNo module named it __ispkg__t __importer__iN(tsplitt_determine_import_contextR&t
_do_importtsystmodulestKeyErrort_import_top_modulet ImportErrortlent__dict__tgett_finish_importthasattrtgetattr(
R
tfqnametglobalstlocalstfromlisttpartstparenttmodulet
top_moduletimporter((s/usr/lib64/python2.6/imputil.pyR Vs2  'cCs¯| p|id� odS|d}|do)ti|}||ijpt�|S|id�}|djodS|| }ti|}|i|jpt�|S(sJReturns 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(R1RR*R+R0RtrfindR>(R
R6t
parent_fqnameR:ti((s/usr/lib64/python2.6/imputil.pyR(�s 
 



cCs\xUtiD]J}t|t�o|ii||�}n|i|�}|o|Sq
WdS(N(R*tpathRt _StringTypeRtimport_from_dirt
import_topR(R
tnametitemR;((s/usr/lib64/python2.6/imputil.pyR-¼s
 cCs*|iid�}|pntd�dS(s*Python calls this hook to reload a module.R&sreload not yet implementedN(R0R1t SystemError(R
R;R=((s/usr/lib64/python2.6/imputil.pyt _reload_hookÈsN(R>t
__module__t__doc__R t __builtin__RRRRRR#R R(R-RI(((s/usr/lib64/python2.6/imputil.pyRs   ? ' cBsVeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
RS( s3Base class for replacing standard import functions.cCs|id||�S(sImport a top-level module.N(t _import_oneR(R
RF((s/usr/lib64/python2.6/imputil.pyREÜscCs@|i||�}|p|S|io|i||�n|S(N(t
_load_tailR%t_import_fromlist(R
ttopR9R8tbottom((s/usr/lib64/python2.6/imputil.pyR2äs 
cCs}yti|SWntj
onX|i|||�}|djodS|i||�}|ot|||�n|S(sImport a single module.N(R*R+R,tget_codeRt_process_resulttsetattr(R
R:tmodnameR5tresultR;((s/usr/lib64/python2.6/imputil.pyRMs
cBsÌ|\}}}e|e�}|o
|}nei|�}||_||_|ii|�|ei |<|p>y||iUWq²|ei joei |=n�q²Xnei |}||_
|S(N( RRRt
new_moduleR&R%R0tupdateR*R+R>(R
RVR5tispkgtcodetvaluest is_moduleR;((s/usr/lib64/python2.6/imputil.pyRSs&
  
 
 cCsUxN|D]F}d|i|f}|i|||�}|ptd|�qqW|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.%ssNo module named (R>RMR.(R
tmR9tpartR5((s/usr/lib64/python2.6/imputil.pyRNAscCs­d|jo)t|�t|iidg��}nxp|D]h}|djoUt||� oDd|i|f}|i|||�}|ptd|�q¥q=q=WdS(s*Import any sub-modules in the "from" list.t*t__all__s%s.%sscannot import name N(tlistR0R1R3R>RMR.(R
tpackageR8tsubtsubnametsubmod((s/usr/lib64/python2.6/imputil.pyROMs
  cCsS|d}|id|}|i|||�}|pdS|i||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.
iR$iN(R>RMRR2(R
R:R9R8ttop_namet
top_fqnameR<((s/usr/lib64/python2.6/imputil.pyR)_s 
cCs
td�dS(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.
sget_code not implementedN(t RuntimeError(R
R:RUR5((s/usr/lib64/python2.6/imputil.pyRRrs( R>RJRKRER2RMRSRNROR)RR(((s/usr/lib64/python2.6/imputil.pyRÙs  #  %  tctos.pycCsît|d�i�}|o|ddjo|d}nti||d�}yt|td�}Wntj
onoX|id�|itid|��t i
||�|i �|i dd�|it
i��|i�|S( sNCompile (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.
trUiÿÿÿÿs
texectwbts<Ii(topentreadRLtcompilet _suffix_chartIOErrortwritetstructtpacktmarshaltdumptflushtseekRt get_magictclose(tpathnamet timestampt
codestringRZtf((s/usr/lib64/python2.6/imputil.pyt_compile�s



cCs ti}d
}d|jod}ddkl}n©d|jod}ddkl}n�d|jod}ddkl}n[d|jod}ddkl}n4d |joddkl}d
�}n
t d �|d
jo|d �}n|a
|a d
S(sISet up 'os' module replacement functions for use during import bootstrap.tposixt/iÿÿÿÿ(tstattnts\tdostos2tmaccSsT|djo|Sd|jod|}n|ddjo|d}n||S(NRt:iÿÿÿÿ((tatb((s/usr/lib64/python2.6/imputil.pytjoinÓs

sno os specific module foundcSsK|djo|S|d}|djp
||jo ||S|||S(NRiÿÿÿÿR�((R�R�tseptlastchar((s/usr/lib64/python2.6/imputil.pyR�ßs 

 N( R*tbuiltin_module_namesRR�R�R�R�R�R�R.Rt
_os_path_join(tnamesR�R�R�((s/usr/lib64/python2.6/imputil.pyR¿s, 






 cCs8yt|�}Wntj
odSX|id@djS(s&Local replacement for os.path.isdir().iði@N(RtOSErrorRtst_mode(R}ts((s/usr/lib64/python2.6/imputil.pyt_os_path_isdirís
cCs4yt|�}Wntj
odSXt|i�S(s,Return the file modification time as a Long.N(RR�Rtlongtst_mtime(R}R�((s/usr/lib64/python2.6/imputil.pyt
_timestampõs
cBseZd�ZRS(cCsx|odSti|�o
ti}n"ti|�o
ti}ndSti|d|dd|f�}d|hfS(NRi(RRt
is_builtint C_BUILTINt is_frozent PY_FROZENt load_module(R
R:RUR5ttypeR;((s/usr/lib64/python2.6/imputil.pyRRs

!(R>RJRR(((s/usr/lib64/python2.6/imputil.pyRsRcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs
g|_dS(N(tsuffixes(R
((s/usr/lib64/python2.6/imputil.pyR#scCs.t|�pt�|ii||f�dS(N(RRR�tappend(R
RR((s/usr/lib64/python2.6/imputil.pyRscCs7|it||�|�}|o|i||�SdS(N(t_import_pathnameR�RSR(R
tdirR5RV((s/usr/lib64/python2.6/imputil.pyRD"scCsk|pt�x>|iD]3}|it||�|�}|dj o|SqW|it|i|�|�S(N(Rt__path__R¡R�Rt
__pkgdir__(R
R:RUR5tsubmodule_pathRZ((s/usr/lib64/python2.6/imputil.pyRR(s

 c CsÅt|�oZ|it|d�|�}|o3|d}||d<|g|d<d|d|fSdSxW|iD]L\}}||}yt|�}Wntj
oqqX||||�SqqWdS(NR#iR¤R£i(R�R¡R�RR�RR�( R
R}R5RVR[RRtfilenametfinfo((s/usr/lib64/python2.6/imputil.pyR¡6s$
 




(R>RJR#RRDRRR¡(((s/usr/lib64/python2.6/imputil.pyRs
    c Cs|d t}t|d�}t|�}d}|dj o�||jo|t|d�}|id�ti�joCti d|id��d}||jot
i |�}q¸n|i �n|djo|}t
||�}nd|h|d6fS(Niýÿÿÿitrbis<Iit__file__(t_suffixR�R�RRoRpRR{RutunpackRwtloadR|R�( R¦R§R5tfilett_pytt_pycRZR�tt((s/usr/lib64/python2.6/imputil.pyR Ps 

RcBseZd�Zd�ZRS(cCs
||_dS(N(R"(R
R"((s/usr/lib64/python2.6/imputil.pyR#dscCsGt||id�}ti||||i�}||_d|hfS(Nii(RoR"RR�R©(R
R¦R§R5tfpR;((s/usr/lib64/python2.6/imputil.pyRgs (R>RJR#R(((s/usr/lib64/python2.6/imputil.pyRcs cCs`tii�}|i�x@|D]8\}}|o|G|iidd�GHq |GdGHq WdS(NR&s-- no importers-- non-existent module(R*R+titemstsortR0R1(R²RFR;((s/usr/lib64/python2.6/imputil.pyt_print_importersps
 cCs't�i�tiidt��dS(Ni(RRR*RBtinsertR(((s/usr/lib64/python2.6/imputil.pyt _test_revampys
((((RKtwarningsRRR*RLRuRwR`R�RCRRRt __debug__RrRªR�RRR�RR�R�RRR RR´R¶(((s/usr/lib64/python2.6/imputil.pyt<module> s4       »Á
 
 . 
6