当前位置: 首页>>代码示例>>Python>>正文


Python Transport.make_connection方法代码示例

本文整理汇总了Python中xmlrpclib.Transport.make_connection方法的典型用法代码示例。如果您正苦于以下问题:Python Transport.make_connection方法的具体用法?Python Transport.make_connection怎么用?Python Transport.make_connection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xmlrpclib.Transport的用法示例。


在下文中一共展示了Transport.make_connection方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: make_connection

# 需要导入模块: from xmlrpclib import Transport [as 别名]
# 或者: from xmlrpclib.Transport import make_connection [as 别名]
 def make_connection(self, host):
     self.realhost = host
     proxies = urllib.getproxies()
     proxyurl = None
     if 'http' in proxies:
         proxyurl = proxies['http']
     elif 'all' in proxies:
         proxyurl = proxies['all']
     if proxyurl:
         urltype, proxyhost = urllib.splittype(proxyurl)
         host, selector = urllib.splithost(proxyhost)
         h = httplib.HTTP(host)
         self.proxy_is_used = True
         return h
     else:
         self.proxy_is_used = False
         return Transport.make_connection(self, host)
开发者ID:BackupTheBerlios,项目名称:griffith-svn,代码行数:19,代码来源:PluginMovieMovieMeter.py

示例2: make_connection

# 需要导入模块: from xmlrpclib import Transport [as 别名]
# 或者: from xmlrpclib.Transport import make_connection [as 别名]
 def make_connection(self, host):
     """Create the connection for the transport and save it."""
     self.conn = Transport.make_connection(self, host)
     return self.conn
开发者ID:pombreda,项目名称:UnnaturalCodeFork,代码行数:6,代码来源:timeout.py

示例3: make_connection

# 需要导入模块: from xmlrpclib import Transport [as 别名]
# 或者: from xmlrpclib.Transport import make_connection [as 别名]
 def make_connection(self, host):    
     conn = Transport.make_connection(self, host)
     conn.timeout = self._timeout
     return conn
开发者ID:kbm1422,项目名称:New_Framework,代码行数:6,代码来源:xmlrpc.py


注:本文中的xmlrpclib.Transport.make_connection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。