本文整理汇总了Python中lds.LDSUtilities.LDSUtilities.interceptSystemProxyInfo方法的典型用法代码示例。如果您正苦于以下问题:Python LDSUtilities.interceptSystemProxyInfo方法的具体用法?Python LDSUtilities.interceptSystemProxyInfo怎么用?Python LDSUtilities.interceptSystemProxyInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lds.LDSUtilities.LDSUtilities
的用法示例。
在下文中一共展示了LDSUtilities.interceptSystemProxyInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from lds.LDSUtilities import LDSUtilities [as 别名]
# 或者: from lds.LDSUtilities.LDSUtilities import interceptSystemProxyInfo [as 别名]
def __init__(self,conn_str=None,user_config=None):
'''
Init driver, read config and set up proxy data.
Notes on Proxies:
DIRECT implies no proxy but urllib2 requests may bypass this and read proxy data from the reg/env
SYSTEM explicitly reads reg/env proxy settings and uses them in a ProxyHandler
'''
super(WFSDataStore,self).__init__(conn_str,user_config)
#We set the proxy options here as this is the collection point for all WFS/network requests
self.PP = LDSUtilities.interceptSystemProxyInfo(self.confwrap.readDSParameters('Proxy'),self.PROXY_TYPE[1])
#convenience proxy map (for urlopen proxyhandler)
self.pxy = {'http':'{}:{}'.format(self.PP['HOST'],self.PP['PORT'])}