1

我创建了一个名为“timesTwo”的服务,并将文件放在正确的目录中。但是,当我尝试从客户端代码调用它时,它告诉我该服务不存在。创建服务器端代码后,如何公开服务?我错过了哪些步骤?

服务器端代码:

from pyamf.remoting.gateway.wsgi import WSGIGateway

def timesTwo(data):
    return data * 2

services = {
    'timesTwo': timesTwo,
    # Add other exposed functions here
}

gateway = WSGIGateway(services)

我很难找到在线文档。谢谢您的帮助!

旁注:是否有一些资源(网站、书籍、任何东西)比您推荐的 pyamf.org 上的内容更全面?!

4

0 回答 0