如何在 Mono 上开发 IronPython 应用程序?

发布于 2024-09-18 11:05:11 字数 753 浏览 4 评论 0原文

我可能需要编写一些在.Net(和Windows)上运行的GUI应用程序,而我可以使用Mono(在Ubuntu和/或Gentoo上)。我对Python非常熟悉;此外,我了解到 Mono Windows.Forms 程序集似乎可用性令人满意(我已经使用 Windows.Forms 成功运行了 .Net 应用程序)。

要拥有一个可以在 GNU/Linux 机器上开发独立 IronPython 的环境,我必须采取哪些步骤?另外,我非常感谢一些 .Net-Mono 兼容性指针(例如我应该知道或避免的事情)。

我不是在寻找 IDE;而是在寻找 IDE。我很轻松地使用 vim 进行编辑,而且我不介意以编程方式构建 GUI。

注意:我实际上要问的是以下方面的帮助:

  • 我显然必须安装 IronPython;所以我确保我的 Mono 软件包已安装,然后我运行 IronPython 安装程序(显然使用 Mono),就像在 Windows 上一样?这会让 IronPython 程序集可供 Mono 使用吗?如果没有,我该怎么做? Ubuntu 9.10 有一个适用于 IronPython 的软件包,但它不是最新版本;同时,出于兼容性目的,我无法升级Ubuntu安装。我找不到 Gentoo 的 ebuild。
  • 我还需要安装更多组件吗?
  • 成功安装 IronPython 后,如何从 IronPython 源创建 .Net/Mono 可执行文件?有“正确”的方法吗?
  • 有没有办法将 IronPython(以及任何其他必需的)程序集“嵌入”到最终的 .exe 中?

I might need to write some GUI application that runs on .Net (and Windows), while what I can work with is Mono (on Ubuntu and/or Gentoo). I am very familiar with Python; in addition, I understand that the Mono Windows.Forms assemblies seem to be satisfactorily usable (I've run successfully .Net applications using Windows.Forms).

What are the steps I would have to take to have an environment where I can develop stand-alone IronPython on a GNU/Linux maching? Also, I would very much appreciate some .Net-Mono compatibility pointers (e.g. things I should know or avoid).

I'm not looking for an IDE; I'm quite at ease using vim for my editing purposes, and I don't mind building GUIs programmatically.

Note: what I'm actually asking, is help with the following:

  • I obviously have to install IronPython; so I make sure my Mono packages are installed, then I run the IronPython installer (using Mono, obviously) just like I would on Windows? Will this make the IronPython assemblies available to Mono? If not, how can I do that? Ubuntu 9.10 has a package for IronPython, but it's not the latest version; at the same time, for compatibility purposes, I can't upgrade the Ubuntu installation. I can't find an ebuild for Gentoo.
  • Do I have to install any more assemblies?
  • After I successfully install IronPython, how do I create a .Net/Mono executable from my IronPython sources? Is there a “proper” way?
  • Is there a way to “embed” the IronPython (and any other required) assemblies in the final .exe?

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

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

发布评论

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

评论(2

薯片软お妹 2024-09-25 11:05:11

查看 IronPython Cookbook 上的 Windows 窗体部分,了解有关创建 Windows 窗体应用程序的提示。

至于环境,我会用 Mono 编写应用程序并检查它是否可以在 Windows 上运行。我会设置两个虚拟机和任何源代码控制系统来在它们之间传输源代码。

关键部分是编写和运行测试,以便您可以验证它在两个平台上是否有效。所以你不能确定只使用 GNU/Linux 机器。但我认为你可以安装Windows 7 30天的试用期。

我曾经编写过 WinForms 测试,因此这里是我的博客和其他几篇文章的链接:

Check Windows Forms section on IronPython Cookbook for hints about creating Windows Forms applications.

As to the environment, I would write the app in Mono and check it works on Windows. I would set up two virtual machines and any source control system to transfer sources between them.

The key part is to write and run tests so you can verify it works on both platforms. So you cannot use just GNU/Linux machine to be sure. But I think you can install Windows 7 for 30-days trial period.

I used to write WinForms tests so here is link to my blog and several other articles:

埋葬我深情 2024-09-25 11:05:11

IronPython 表示它需要 Reflection.Emit 和轻量级代码生成。 FAQ iOS 往往不赞成这种事情。所以如果你想做iOS,那你可能就不走运了。

IronPython says it requires Reflection.Emit and lightweight code generation. FAQ iOS tends to frown on that kind of thing. So if you want to do iOS, you may be out of luck.

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