首页 > 代码库 > python调webservice和COM接口

python调webservice和COM接口

调webservice

# -*- coding: cp936 -*-from suds.client import Clienturl = http://192.168.50.165/portal/remoting/ERMClientService?wsdlclient = Client(url)print clientproxy = client.serviceresult = proxy.getUserByUserName(admin).encode(gbk)print result

 

调COM

from win32com.client import Dispatchfm = Dispatch("PeraFileManage.FileManage")#fm.SaveFile("d:\\123.txt", "asdfadsfa")#print(fm.SelectFile())print(fm.SelectDir())

 

python调webservice和COM接口