2012-10-28 56 views

回答

0

你得下面的補丁適用於ideone.py

diff --git a/ideone.py b/ideone.py 
index fffdf27..b15abef 100644 
--- a/ideone.py 
+++ b/ideone.py 
@@ -42,10 +42,10 @@ def getError(response): 


class IdeOne: 
- def __init__(self, user='test', password='test'): 
+ def __init__(self, user='test', password='test', **kwargs): 
     self._user = user 
     self._password = password 
-  self._wsdlObject = WSDL.Proxy('http://ideone.com/api/1/service.wsdl') 
+  self._wsdlObject = WSDL.Proxy('http://ideone.com/api/1/service.wsdl', **kwargs) 

    def testFunction(self): 
     response = self._wsdlObject.testFunction(self._user, self._password) 

這將允許傳遞關鍵字參數將被用來建立其內部Client.SOAPProxy實例WSDL.ProxyClient.SOAPProxy有一個http_proxy關鍵字參數,因此,在應用修補程序後,IdeOne(user='test', password='test', http_proxy='the.http.proxy')應該可以工作。

相關問題