怎样将数组作为参数传到函数里????
时间:2010-12-19
来源:互联网
test_server.py(模拟服务器)
Python code
test_client.py(模拟客户端)
Python code
Traceback (most recent call last):
File "test_client.py", line 11, in <module
Arraysort(li)
NameError: name 'Arraysort' is not defined
Python code
... def Arraysort(self,array): for i in range(len(array)-1): for j in range(i+1,array): if (array[i]>ayyay[j]): n=array[i] array[i]=array[j] array[j]=n for i in range(len(array)): print array[i] ...
test_client.py(模拟客户端)
Python code
.... li=[4,23,5,46,7,3,3] Arraysort(li) ...
Traceback (most recent call last):
File "test_client.py", line 11, in <module
Arraysort(li)
NameError: name 'Arraysort' is not defined
作者: qazwsx123asdfadf 发布时间: 2010-12-19
为什么你觉得test_server.py里定义的函数可以在test_client.py里访问?
作者: iambic 发布时间: 2010-12-19
引用 1 楼 iambic 的回复:
为什么你觉得test_server.py里定义的函数可以在test_client.py里访问?
为什么你觉得test_server.py里定义的函数可以在test_client.py里访问?
是这样的,先用eclipse做一个wsdl文件,里面包含一个函数Arraysort(输入array_in:complex类型,输出array_out:complex类型)。再通过wsdl2py -f cal.wsdl -e和wsdl2dispatch -f cal.wsdl -e生成对应的python文件。
test_server.py(模拟服务器)做调用
Python code
from ZSI.ServiceContainer import ServiceContainer from cal_services_server import cal
test_client.py(模拟客户端)做调用
Python code
from cal_services import calSOAPSOAP hw = calSOAPSOAP("http://localhost:9999/cal")
作者: qazwsx123asdfadf 发布时间: 2010-12-20
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28