使用 IronPython 中的 PyQt

发布于 2024-09-14 16:34:27 字数 120 浏览 4 评论 0原文

是否可以使用 IronPython 中的 PyQt?

根据我的阅读,IronPython 应该与 CPython 兼容的库一起使用,但开箱即用它似乎不起作用。

如果可能的话,代码完成会起作用吗?

Is it possible to use PyQt from IronPython?

From what I've read IronPython should work with CPython compatible libraries but out of the box it doesn't seem to work.

If it is possible, will code completion work?

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

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

发布评论

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

评论(3

離殇 2024-09-21 16:34:27

您无法直接从 IronPython 导入 CPython 模块。有一个项目试图提供一种方法来执行此操作:http://code.google.com /p/ironclad/,但我不确定他们是否已经支持 PyQT。

另一方面,您可以尝试使用 WPF 而不是 PyQT。我两者都使用过,而且我发现 WPF 在各方面都更胜一筹。

我当前的 GUI 应用程序基于 IronPython + WPF,编程是我的梦想。

You can't import CPython modules from IronPython directly. There is a project which tries to provide a way to do this: http://code.google.com/p/ironclad/, but I'm not sure if they support PyQT already.

On the other hand, you might try using WPF instead of PyQT. I used both, and I find WPF superior in every way.

My current GUI app is based on IronPython + WPF and it's a dream to program.

檐上三寸雪 2024-09-21 16:34:27

希望其他花更多时间解决这个问题的人过来并给你合格的、模棱两可的答案,但这里有一些来自我个人经验的可疑见解:

PyQt 与 cPython 的关系与 .Net 与 IronPython 的关系非常不同。

虽然 IronPython 构建在 .Net 之上,但 PyQt 是一个二进制、半自动生成的绑定集,特定于编译它的 cPython 版本。

由于多种原因,我在针对 IronPython 运行“标准”二进制 python 模块时遇到问题。只有可以被 IronPython 解释为“Python”的纯 Python 模块才适合我。

我并不是说“这是不可能的”,但我确实希望如果您设法将 PyQt 编译并安装到 IronPython 中,您将获得非常糟糕的设置体验。

Hope someone else who spent more time messing around with this comes by and gives you qualified, ambiguous answer, but here is some questionable insight from my personal experience:

PyQt relates to cPython in a way that is very different than .Net relates to IronPython.

While IronPython is built on TOP of .Net, PyQt is a BINARY, semi-automatically generated set of bindings specific to a version of cPython against which it was compiled.

For a variety of reasons, i have problems running "standard" BINARY python modules against IronPython. Only the pure-Python modules that can be interpreted by IronPython as "Python" would ever work for me.

I am not saying "it can't be done," but I do expect you to have very bad experience with the set up if you manage to compile and install PyQt into IronPython.

微暖i 2024-09-21 16:34:27

您不能将 pyqt/pyside 与ironpython 一起使用。

您可能可以使用 qyoto(qt 的 c#/.net 绑定),不幸的是它看起来像它的使用频率不高/支持良好/等等。如 pyqt/pyside.

You can't use pyqt/pyside with ironpython.

You could probably use qyoto(the c#/.net binding for qt) unfortunatly it looks like its not nearly as often used/well supported/etc. as pyqt/pyside.

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