def get_module_complexity(module_path, threshold=7):
 with open(module_path, 'rU') as mod:
  code = mod.read()
 return get_code_complexity(code, threshold, filename=module_path)

def get_module_complexity ( module_path , threshold = 7 ) : with open ( module_path , 'rU' ) as mod : code = mod . read ( ) return get_code_complexity ( code , threshold , filename = module_path )
returns the complexity of a module .