def name_lookup(qualified_name):
 if ('.' not in qualified_name):
  qualified_name = ('__builtin__.' + qualified_name)
 (module_name, class_name) = qualified_name.rsplit('.', 1)
 module = __import__(module_name, fromlist=[class_name])
 return getattr(module, class_name)

def name_lookup ( qualified_name ) : if ( '.' not in qualified_name ) : qualified_name = ( '__builtin__.' + qualified_name ) ( module_name , class_name ) = qualified_name . rsplit ( '.' , 1 ) module = __import__ ( module_name , fromlist = [ class_name ] ) return getattr ( module , class_name )
return the object referenced by a qualified name .