def load_fp(source, module_name):
 thrift = parse_fp(source, module_name)
 sys.modules[module_name] = thrift
 return thrift

def load_fp ( source , module_name ) : thrift = parse_fp ( source , module_name ) sys . modules [ module_name ] = thrift return thrift
load thrift file like object as a module .