Package schrodinger :: Package utils :: Module urllib
[hide private]
[frames] | no frames]

Module urllib

Functions that help access web URLs through proxy servers.

This module has two main user-facing functions:

  1. get_opener - Returns a urllib2.OpenerDirector object that is configured to read proxy information from the Schrodinger configuration file. This OpenerDirector object also deals with tunnelling HTTPS proxy servers properly.
  2. install_opener - Installs the urllib2.OpenerDirector object that would be returned by get_opener() as the default opener for all urllib2.urlopen calls.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  PasswordRetryException
  ProxyPasswordManager
  ProxyHandler
A ProxyHandler subclass that loads its proxy configuration from 'web_proxy.json' file in the Schrodinger app data directory.
  ProxyBasicAuthHandler
  ProxyDigestAuthHandler
  MyHTTPHandler
  ProxyTunnelError
  MyHTTPSHandler
  HTTPSHandler
Functions [hide private]
 
get_proxy_config_file()
Return the default user proxy config file name.
 
get_opener(password_manager=None)
Return a urllib2.DirectorOpener that deal with proxy tunneling errors and configures its proxy handler from the 'web_proxy.json' file in the Schrodinger app data directory.
 
install_opener()
Install the opener returned by get_opener() as the default opener.
 
_tunnel(self)
Variables [hide private]
  __doc__ = ...
  config_filename = 'web_proxy.json'
  __package__ = None
hash(x)
Function Details [hide private]

get_proxy_config_file()

 

Return the default user proxy config file name.

This is the file web_proxy.json in the user's app data directory.


Variables Details [hide private]

__doc__

Value:
"""
Functions that help access web URLs through proxy servers.

This module has two main user-facing functions:

    1. get_opener - Returns a urllib2.OpenerDirector object that is
       configured to read proxy information from the Schrodinger
       configuration file. This OpenerDirector object also deals with
...