2009-09-30 2 views

답변

2

여기에 ServiceProxy 클래스의 일부 documentation이 있습니다. 생성자는 tracefile 인수를 받아들입니다.이 인수는 write 메서드를 가진 모든 객체가 될 수 있으므로 이후에 보이는 것과 같습니다. 설명서에서 예제를 수정하십시오.

from ZSI import ServiceProxy 
import BabelTypes 
import sys 

dbgfile = open('dbgfile', 'w') # to log trace to a file, or 
dbgfile = sys.stdout    # to log trace to stdout 
service = ServiceProxy('http://www.xmethods.net/sd/BabelFishService.wsdl', 
         tracefile=dbgfile, 
         typesmodule=BabelTypes) 
value = service.BabelFish('en_de', 'This is a test!') 

dbgfile.close() 
관련 문제