ACC SHELL
Ńň
sÄMc @ sz d Z d d k l Z d d k l Z l Z l Z l Z d d k l Z l
Z
l Z d Z d e i
f d YZ d 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˙˙˙˙( t dirnamet joint existst sep( t
FromImportt symst tokenc c sř | g } xč | oŕ | i } | i t i j o | i Vq | i t i j o3 d i g } | i D] } | | i qe ~ Vq | i t i j o | i
| i d q | i t i j o! | i | i d d d
q t
d q Wd S( sF
Walks over all the names imported in a dotted_as_names node.
t i Niţ˙˙˙s unkown node type( t popt typeR t NAMEt valueR t dotted_nameR t childrent dotted_as_namet appendt dotted_as_namest extendt AssertionError( t namest pendingt nodet _[1]t ch( ( s. /usr/lib/python2.6/lib2to3/fixes/fix_import.pyt traverse_imports s 3!t FixImportc B s e Z d Z d Z d Z RS( sj
import_from< 'from' imp=any 'import' ['('] any [')'] >
|
import_name< 'import' imp=any >
c C s | d } | i t i j oZ x"