def proxy_bypass_environment(host):
 no_proxy = (os.environ.get('no_proxy', '') or os.environ.get('NO_PROXY', ''))
 if (no_proxy == '*'):
  return 1
 (hostonly, port) = splitport(host)
 for name in no_proxy.split(','):
  if (name and (hostonly.endswith(name) or host.endswith(name))):
   return 1
 return 0

def proxy_bypass_environment ( host ) : no_proxy = ( os . environ . get ( 'no_proxy' , '' ) or os . environ . get ( 'NO_PROXY' , '' ) ) if ( no_proxy == '*' ) : return 1 ( hostonly , port ) = splitport ( host ) for name in no_proxy . split ( ',' ) : if ( name and ( hostonly . endswith ( name ) or host . endswith ( name ) ) ) : return 1 return 0
test if proxies should not be used for a particular host .