def _import(name):
 mod = __import__(name)
 components = name.split('.')
 for comp in components[1:]:
  try:
   mod = getattr(mod, comp)
  except AttributeError:
   raise ImportError(('No module named %s' % mod))
 return mod

def _import ( name ) : mod = __import__ ( name ) components = name . split ( '.' ) for comp in components [ 1 : ] : try : mod = getattr ( mod , comp ) except AttributeError : raise ImportError ( ( 'No module named %s' % mod ) ) return mod
creates a global translation dictionary for module .