ACC SHELL

Path : /usr/lib/python/lib2to3/fixes/
File Upload :
Current File : //usr/lib/python/lib2to3/fixes/fix_import.pyo

Ńň
sÄMc@szdZddklZddklZlZlZlZddkl	Z	l
Z
lZd„Zdei
fd„ƒYZd	S(
sŢFixer for import statements.
If spam is being imported from the local directory, this import:
    from spam import eggs
Becomes:
    from .spam import eggs

And this import:
    import spam
Becomes:
    from . import spam
i(t
fixer_basei˙˙˙˙(tdirnametjointexiststsep(t
FromImporttsymsttokenccsř|g}xč|oŕ|iƒ}|itijo|iVq|itijo3dig}|iD]}||iqe~ƒVq|iti	jo|i
|idƒq|itijo!|i|iddd…ƒqt
dƒ‚qWdS(sF
    Walks over all the names imported in a dotted_as_names node.
    tiNiţ˙˙˙sunkown node type(tpopttypeRtNAMEtvalueRtdotted_nameRtchildrentdotted_as_nametappendtdotted_as_namestextendtAssertionError(tnamestpendingtnodet_[1]tch((s./usr/lib/python2.6/lib2to3/fixes/fix_import.pyttraverse_importss	3!t	FixImportcBs eZdZd„Zd„ZRS(sj
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    cCs|d}|itijoZx"t|dƒp|id}q W|i|iƒod|i|_|iƒqnt}t}x4t	|ƒD]&}|i|ƒo
t
}qt
}qW|o |o|i|dƒndStd|gƒ}|i
|_
|SdS(NtimpRiu.s#absolute and local imports togethert.(R
Rtimport_fromthasattrRtprobably_a_local_importRtchangedtFalseRtTruetwarningRtprefix(tselfRtresultsRt
have_localt
have_absolutetmod_nametnew((s./usr/lib/python2.6/lib2to3/fixes/fix_import.pyt	transform.s,



cCs’|iddƒd}t|iƒ}t||ƒ}ttt|ƒdƒƒptSx6dtdddd	gD]}t||ƒotSqnWtS(
NRiis__init__.pys.pys.pycs.sos.sls.pyd(tsplitRtfilenameRRR!RR"(R%timp_namet	base_pathtext((s./usr/lib/python2.6/lib2to3/fixes/fix_import.pyRNs	(t__name__t
__module__tPATTERNR+R(((s./usr/lib/python2.6/lib2to3/fixes/fix_import.pyR&s	 N(t__doc__RRtos.pathRRRRt
fixer_utilRRRRtBaseFixR(((s./usr/lib/python2.6/lib2to3/fixes/fix_import.pyt<module>s
"	

ACC SHELL 2018