将C#GUI与Python代码相结合? [英] combining a C# GUI with Python code?

查看:373
本文介绍了将C#GUI与Python代码相结合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以构建一个C#表单(使用Visual Studio),但是只写Python事件的
?有没有办法告诉你的程序

每当代码运行时运行Python,因为它将是所有Python代码

(例如按钮按等)? br />

我知道它有点傻,它会让你的程序依赖于.NET,但是

这将是一个很好的简单方法来创建一个GUI,同时仍然写在
Python中,如果可能的话。

Is it possible to construct a C# form (using Visual Studio) but write
only Python code for the events? Is there some way to tell your program
to run Python whenever code is run, since it will be all Python code
(e.g. for button presses, etc.)?

I know it''s sort of silly, and it makes your program depend on .NET, but
it would be a nice and easy way to create a GUI while still writing in
Python, if it''s possible.

推荐答案

首先,你应该考虑一下ironpython而不是

cpython。

这样你就可以忘记c#并在(铁)python中完成所有这些。

我我不知道它目前的状态,但微软正在开发一个Visual

Studio - Ironpython集成。


欲了解更多信息:
< a rel =nofollowhref =http://lists.ironpython.com/htdig.cgi/users-ironpython.com/2006-February/001752.html\"target =_ blank> http://lists.ironpython .com / htdig.cg ... ry / 001752.html

First of all, you should be thinking about ironpython instead of
cpython.
This way you can forget about c# and do it all in (iron)python.
I don''t know its current state, but Microsoft is working in a Visual
Studio - Ironpython integration.

For more info:
http://lists.ironpython.com/htdig.cg...ry/001752.html


现在在我想到它,我不确定Visual Studio是否可以用ironpython创建

GUI。我想在这一刻,它的整合仅仅是一个文本编辑器(虽然我可能错了)。


我几乎忘了它,但有人正在使用一个小工具,

将C#表单转换为python类(用于与ironpython一起使用)。


检查出来: http://www.digitalfanatics.org/e8johan/projects/cs2py/

Now that I think about it, I''m not sure if Visual Studio can create
GUIs with ironpython already. I guess that at this moment, its
integration is as a text editor only (I may be wrong though).

I almost forgot it, but someone was working in a little tool that
converts C# forms into python classes (for being used with ironpython).

Check it out: http://www.digitalfanatics.org/e8johan/projects/cs2py/


LuisM.González写道:
Luis M. González wrote:
现在我想起来了,我不确定Visual Studio是否可以创建
已经有了ironpython的GUI。我想在这一刻,它的整合只是一个文本编辑器(虽然我可能错了)。

我差点忘了它,但有人正在使用一个小工具<将C#表单转换为python类(用于与ironpython一起使用)。

检查出来: http://www.digitalfanatics.org/e8johan/projects/cs2py/
Now that I think about it, I''m not sure if Visual Studio can create
GUIs with ironpython already. I guess that at this moment, its
integration is as a text editor only (I may be wrong though).

I almost forgot it, but someone was working in a little tool that
converts C# forms into python classes (for being used with ironpython).

Check it out: http://www.digitalfanatics.org/e8johan/projects/cs2py/




谢谢你信息!



Thanks for the information!


这篇关于将C#GUI与Python代码相结合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆