如何用Python创建Win32 Hello World? [英] How to create a Win32 Hello World with Python?

查看:81
本文介绍了如何用Python创建Win32 Hello World?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计:

我是Linux设备驱动程序的人,我相信Python / Perl风格的语言将成为我的未来。所以我正在探索Python Win32,现在第一件事是Hello world,有没有人知道如何用Python创建Win32 Hello World?

Hi folks :
I am a Linux device driver guy, I believe Python/Perl style language is going to be my future. So I am exploring Python Win32, now the first thing is Hello world, does anybody know how to create a Win32 Hello World with Python?

推荐答案

因为你是在Linux上,你不宁愿使用(比方说)Tkinter或wxPython来编写可移植代码吗?...除非你想进入MS膨胀的胆量......我通常只使用win32如果没有别的办法(我为windows编写应用程序。)
Since you''re on Linux, wouldn''t you rather write portable code using (say) Tkinter or wxPython?... Unless you want to get into the guts of MS bloat... I normally only use win32 if there''s no other way (I write apps for windows).



因为你在Linux上,你不想使用(编写可移植代码)说)Tkinter或wxPython?...除非你想进入MS膨胀的胆量...我通常只使用win32,如果没有别的办法(我为windows编写应用程序)。
Since you''re on Linux, wouldn''t you rather write portable code using (say) Tkinter or wxPython?... Unless you want to get into the guts of MS bloat... I normally only use win32 if there''s no other way (I write apps for windows).



感谢您的回复,实际上我对Tkinter并不熟悉,我确实碰到了一些wxPython资源,但Win32更受欢迎,对吧?我正在探索这种Python-Windows的可能性,接下来的事情将是directpython,这是我的目的地。

Thank you for replying, actually I am not familiar to Tkinter neither, well I did run into some wxPython resources but Win32 is more popular, right? I am exploring this Python-Windows possibility, next thing is going to be directpython, that is my destination.



感谢您的回复,实际上我对Tkinter也不熟悉,我确实碰到了一些wxPython资源,但Win32更受欢迎,对吧?我正在探索这种Python-Windows的可能性,接下来的事情将是directpython,这是我的目的地。
Thank you for replying, actually I am not familiar to Tkinter neither, well I did run into some wxPython resources but Win32 is more popular, right? I am exploring this Python-Windows possibility, next thing is going to be directpython, that is my destination.



Mark Hammond通过为广泛的(膨胀,imho)windows win32 API提供python包装器,提供了出色的服务。 COM模块对于与其他应用程序交互非常有用。文档中有很多例子。也就是说,API本身的文档似乎留给MS文档(你有没有试过在MS手册中查找一些东西?)。

如果你得到Stani的Python编辑器(< a rel =nofollowhref =http://pythonide.stani.be/target =_ blank> http://pythonide.stani.be/ )作为wxPython可以做什么的一个例子,我相信你会发现GUI工具包的极简主义方法已经足够了(它是理想的,imho)。还有你好世界。 wx的例子(Windows,X(Mac也是))Python。

python手册中的Tkinter文档很少。网上有一些,已经出版了一两本书。

Mark Hammond has done a great service by providing python wrappers to the extensive (bloat, imho) windows win32 API. The COM modules are invaluable for interacting with other apps. There are lots of examples in the docs. That said, documentation of the API itself seems to be left to MS docs (have you ever tried to look up something in an MS manual?).
If you get Stani''s Python Editor (http://pythonide.stani.be/) as an example of what wxPython can do, I believe you will see that a minimalist approach to GUI toolkits is more than adequate (it''s ideal, imho). There also "hello world" examples for wx (Windows, X (Mac too)) Python.
Tkinter documentation in python manuals is minimal. There''s some on the web and a book or two have been published.


这篇关于如何用Python创建Win32 Hello World?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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