config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/imputil.pyc

³ò
h”Rc@s9dZddkZddkZddkZddkZddkZdddgZedƒZeeƒZ	ddd„ƒYZ
ddd„ƒYZeod	pd
Z
de
Zd„Zdaad
„Zd„Zd„Zdefd„ƒYZdefd„ƒ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ÿÿÿÿNt
ImportManagertImportertBuiltinImportertcBsqeZdZeeƒd„Zd„Zd„Zd	Z	d	d„Z
d	d	d	d„Zd„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/local/lib/python2.5/imputil.pytinstalls

	cCs|i|id<dS(s&Restore the previous import mechanism.RN(RR	(R((s#/usr/local/lib/python2.5/imputil.pyt	uninstall.scCs+t|ƒpt‚|ii||ƒdS(N(tcallabletAssertionErrortfs_impt
add_suffix(Rtsuffixt
importFunc((s#/usr/local/lib/python2.5/imputil.pyR2scCs¥tptƒn|djo|ipt}|ƒ}n||_xItiƒD];}|dtijo!|i	|dt
|ƒiƒqRqRW|i	dtƒdS(Niis.py(
t_os_statt
_os_bootstraptNonetclsFilesystemImportert_FilesystemImporterRtimptget_suffixestC_EXTENSIONRtDynLoadSuffixImportertimport_filetpy_suffix_importer(RRtclstdesc((s#/usr/local/lib/python2.5/imputil.pyt__init__=s

	

c
Csw|idƒ}|i|ƒ}|o+|ii|||ƒ}|o|SqPnyti|d}Wn>tj
o2|i|dƒ}|ptd|‚q¦nXt	|ƒdjo.|p|Sn|i
idƒp|Sqçn|i
idƒ}	|	o|	i||d|ƒSnt	|ƒdjo8t
||dƒo$|ot||dƒSqf|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_moduletImportErrortlent__dict__tgett_finish_importthasattrtgetattr(
Rtfqnametglobalstlocalstfromlisttpartstparenttmodulet
top_moduletimporter((s#/usr/local/lib/python2.5/imputil.pyR
Ss2'cCs¸|p|idƒodSn|d}|do,ti|}||ijpt‚|Sn|idƒ}|djodSn|| }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(R/RR(R)R.RtrfindR<(RR4t
parent_fqnameR8ti((s#/usr/local/lib/python2.5/imputil.pyR&’s	




cCs_xXtiD]M}t|tƒo|ii||ƒ}n|i|ƒ}|o|Sq
q
WdS(N(R(tpathRt_StringTypeRtimport_from_dirt
import_topR(RtnametitemR9((s#/usr/local/lib/python2.5/imputil.pyR+¹s
cCs*|iidƒ}|pntd‚dS(s*Python calls this hook to reload a module.R$sreload not yet implementedN(R.R/tSystemError(RR9R;((s#/usr/local/lib/python2.5/imputil.pyt_reload_hookÅsN(R<t
__module__t__doc__Rt__builtin__RR
RRRR!R
R&R+RG(((s#/usr/local/lib/python2.5/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(RRD((s#/usr/local/lib/python2.5/imputil.pyRCÙscCsC|i||ƒ}|p|Sn|io|i||ƒn|S(N(t
_load_tailR#t_import_fromlist(RttopR7R6tbottom((s#/usr/local/lib/python2.5/imputil.pyR0ás
cCs€yti|SWntj
onX|i|||ƒ}|djodSn|i||ƒ}|ot|||ƒn|S(sImport a single module.N(R(R)R*tget_codeRt_process_resulttsetattr(RR8tmodnameR3tresultR9((s#/usr/local/lib/python2.5/imputil.pyRKs
cBsÌ|\}}}e|eƒ}|o
|}nei|ƒ}||_||_|ii|ƒ|ei	|<|p>y||iUWq²|ei	joei	|=n‚q²Xnei	|}||_
|S(N(RRRt
new_moduleR$R#R.tupdateR(R)R<(Rt.1R3tispkgtcodetvaluest	is_moduleR9((s#/usr/local/lib/python2.5/imputil.pyRQs&
		

	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<RKR,(RtmR7tpartR3((s#/usr/local/lib/python2.5/imputil.pyRL=scCs­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(tlistR.R/R1R<RKR,(RtpackageR6tsubtsubnametsubmod((s#/usr/local/lib/python2.5/imputil.pyRMIs
	 cCsV|d}|id|}|i|||ƒ}|pdSn|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<RKRR0(RR8R7R6ttop_namet
top_fqnameR:((s#/usr/local/lib/python2.5/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(RR8RSR3((s#/usr/local/lib/python2.5/imputil.pyRPns(R<RHRIRCR0RKRQRLRMR'RP(((s#/usr/local/lib/python2.5/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(topentreadRJtcompilet_suffix_chartIOErrortwritetstructtpacktmarshaltdumptflushtseekRt	get_magictclose(tpathnamet	timestampt
codestringRYtf((s#/usr/local/lib/python2.5/imputil.pyt_compile›s 



cCsti}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
|ad
S(sISet up 'os' module replacement functions for use during import bootstrap.tposixt/iÿÿÿÿ(tstattnts\tdostos2tmaccSsW|djo|Snd|jod|}n|ddjo|d}n||S(NRt:iÿÿÿÿ((tatb((s#/usr/local/lib/python2.5/imputil.pytjoinÏs

sno os specific module foundcSsQ|djo|Sn|d}|djp
||jo||Sn|||S(NRiÿÿÿÿR‚((R‰RŠtseptlastchar((s#/usr/local/lib/python2.5/imputil.pyR‹Ûs

N(R(tbuiltin_module_namesRRRƒR„R…R†R‡R,Rt
_os_path_join(tnamesR‹RŒRƒ((s#/usr/local/lib/python2.5/imputil.pyR»s,	





		
	cCs;yt|ƒ}Wntj
odSnX|id@djS(s&Local replacement for os.path.isdir().iði@N(RtOSErrorRtst_mode(R|ts((s#/usr/local/lib/python2.5/imputil.pyt_os_path_isdirés
	cCs7yt|ƒ}Wntj
odSnXt|iƒS(s,Return the file modification time as a Long.N(RR‘Rtlongtst_mtime(R|R“((s#/usr/local/lib/python2.5/imputil.pyt
_timestampñs
	cBseZd„ZRS(cCs{|odSnti|ƒo
ti}n"ti|ƒo
ti}ndSti|d|dd|fƒ}d|hfS(NRi(RRt
is_builtint	C_BUILTINt	is_frozent	PY_FROZENtload_module(RR8RSR3ttypeR9((s#/usr/local/lib/python2.5/imputil.pyRPÿs

!(R<RHRP(((s#/usr/local/lib/python2.5/imputil.pyRþsRcBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCs
g|_dS(N(tsuffixes(R((s#/usr/local/lib/python2.5/imputil.pyR!scCs.t|ƒpt‚|ii||fƒdS(N(RRRžtappend(RRR((s#/usr/local/lib/python2.5/imputil.pyRscCs:|it||ƒ|ƒ}|o|i||ƒSndS(N(t_import_pathnameRRQR(RtdirR3RT((s#/usr/local/lib/python2.5/imputil.pyRBscCsn|pt‚xA|iD]6}|it||ƒ|ƒ}|dj	o|SqqW|it|i|ƒ|ƒS(N(Rt__path__R RRt
__pkgdir__(RR8RSR3tsubmodule_pathRY((s#/usr/local/lib/python2.5/imputil.pyRP$s

c	CsËt|ƒo`|it|dƒ|ƒ}|o6|d}||d<|g|d<d|d|fSndSnxW|iD]L\}}||}yt|ƒ}Wntj
oqwX||||ƒSqwWdS(NR!iR£R¢i(R”R RRRžRR‘(	RR|R3RTRZRRtfilenametfinfo((s#/usr/local/lib/python2.5/imputil.pyR 2s$
	




(R<RHR!RRBRPR (((s#/usr/local/lib/python2.5/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|d<fS(Niýÿÿÿitrbis<Iit__file__(t_suffixR•R—RRnRoRRzRttunpackRvtloadR{R€(	R¥R¦R3tfilett_pytt_pycRYRtt((s#/usr/local/lib/python2.5/imputil.pyRLs

RcBseZd„Zd„ZRS(cCs
||_dS(N(R (RR ((s#/usr/local/lib/python2.5/imputil.pyR!`scCsGt||idƒ}ti||||iƒ}||_d|hfS(Nii(RnR RRœR¨(RR¥R¦R3tfpR9((s#/usr/local/lib/python2.5/imputil.pyRcs	(R<RHR!R(((s#/usr/local/lib/python2.5/imputil.pyR_s	cCs`tiiƒ}|iƒx@|D]8\}}|o|G|iiddƒGHq |GdGHq WdS(NR$s-- no importers-- non-existent module(R(R)titemstsortR.R/(R±RDR9((s#/usr/local/lib/python2.5/imputil.pyt_print_importersls
cCs'tƒiƒtiidtƒƒdS(Ni(RRR(R@tinsertR(((s#/usr/local/lib/python2.5/imputil.pyt_test_revampus
((((RIRR(RJRtRvR_RRARRRt	__debug__RqR©R€RRRRR”R—RRRRR³Rµ(((s#/usr/local/lib/python2.5/imputil.pys<module>s.»À
	
	.		
6	
		

Man Man