def package_in_frozen(package_name, frozen_output):
 pattern = '(?mi)^{pkg}==|#egg={pkg_under}-'.format(pkg=re.escape(package_name), pkg_under=re.escape(package_name.replace('-', '_')))
 return bool(re.search(pattern, frozen_output))

def package_in_frozen ( package_name , frozen_output ) : pattern = '(?mi)^{pkg}==|#egg={pkg_under}-' . format ( pkg = re . escape ( package_name ) , pkg_under = re . escape ( package_name . replace ( '-' , '_' ) ) ) return bool ( re . search ( pattern , frozen_output ) )
is this package in the output of pip freeze? .