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

Class ProxyHandler

urllib2.BaseHandler --+    
                      |    
   urllib2.ProxyHandler --+
                          |
                         ProxyHandler

A ProxyHandler subclass that loads its proxy configuration from 'web_proxy.json' file in the Schrodinger app data directory.

Instance Methods [hide private]
 
__init__(self, config_file=None)
Create a ProxyHandler.

Inherited from urllib2.ProxyHandler: proxy_open

Inherited from urllib2.BaseHandler: __lt__, add_parent, close

Class Variables [hide private]

Inherited from urllib2.ProxyHandler: handler_order

Method Details [hide private]

__init__(self, config_file=None)
(Constructor)

 

Create a ProxyHandler.

If config_file is provided, use that file for proxy configuration.

Otherwise try the following in order:
    1) The file location specified by the SCHRODINGER_PROXY_CONFIG
       environment variable.
    2) The web_proxy.json file in the user's Schrodinger directory
       (~/.schrodinger on Linux, %APPDATA%/Schrodinger on Windows).
    3) The $SCHRODINGER/web_proxy.json file.

To override an existing $SCHRODINGER/web_proxy.json file, set
SCHRODINGER_PROXY_CONFIG to an empty string.

Overrides: urllib2.ProxyHandler.__init__