def available_on_pypi(prerelease=current_version.is_prerelease):
 client = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
 versions = client.package_releases('pwntools', True)
 versions = map(packaging.version.Version, versions)
 if (not prerelease):
  versions = filter((lambda v: (not v.is_prerelease)), versions)
 return max(versions)

def available_on_pypi ( prerelease = current_version . is_prerelease ) : client = xmlrpclib . ServerProxy ( 'https://pypi.python.org/pypi' ) versions = client . package_releases ( 'pwntools' , True ) versions = map ( packaging . version . Version , versions ) if ( not prerelease ) : versions = filter ( ( lambda v : ( not v . is_prerelease ) ) , versions ) return max ( versions )
return true if an update is available on pypi .