如何实现.NET服务器和Python客户端?

发布于 2024-09-30 02:19:58 字数 188 浏览 1 评论 0原文

我有一个问题。我有一个工具(线程管理器)可以接收一些数据并进行一些计算。我需要编写 Python 客户端来将数据发送到该工具...我想我应该使用 .NET Remoting,但如何做到这一点? 请分享一些链接,我可以在其中阅读或发布一些代码...我无法在谷歌上搜索有关该信息的信息...

PS Python 2.7,而不是 IronPython

I've got a problem. I Have a tool(threads manager) that receives some data and do some computation. I need to write Python client to send data to that tool...I thing I should use .NET Remoting, but how to do that?
pls share some links where I can read or post some code...I can't google info about that...

P.S Python 2.7, NOT IronPython

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一江春梦 2024-10-07 02:19:58

.Net Remoting 是为两端都有.net而设计的,因此从 Python 端使用将非常困难。 (事件 .net 远程处理的 XML 编码不容易从其他平台使用)

我假设 Python 支持肥皂,如果是这样,我会考虑在 .net 端使用 WCF 在“基本配置文件”上运行。 JSON是另一种选择,有很多开源项目向.net添加了JSON支持,我假设Python也有JSON支持。

.Net Remoting is designed for when you have .net at both ends so will be very hard to use from the Python end. (Event the XML encoding of .net remoting is not easy to use from other platforms)

I am assuming that Python has support for soap, if so I would look at using WCF at the .net end running over the “basic profile”. JSON is another option, there are lots of open source projects that add JSON support to .net, I assume that Python also has JSON surport.

浪漫之都 2024-10-07 02:19:58

至于 JSON,在 .NET 端你可以尝试 JsonFx。然后使用任何 json-rpc 客户端从 python 调用它。

As for JSON, on .NET side you could try JsonFx. Then call it from python using any json-rpc client.

定格我的天空 2024-10-07 02:19:58

我会使用 XML-RPC 进行通信。它实现起来非常简单(Python 中的几行代码,不确定 .NET,但在那里也不应该困难),并且在您的场景中应该足够了。

I would use XML-RPC for communication. It is very simple to implement (a couple lines of code in Python, not sure about .NET but it shouldn't be difficult there either) and should be enough in your scenario.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文