如何在 Python 中使用 win32gui 模块?
在我的 Python 文件中,我已经导入了 win32gui
模块,如下所示:
import win32gui
我还下载了 win32gui
但不知道如何运行我的脚本。如何运行导入 win32gui
的 Python 脚本?当我运行它时,我得到:
ImportError: No module named win32gui
抱歉这个新手问题,但我正在尝试学习 Python,所以对此不太了解。
Im my Python file, I have imported the win32gui
module like this:
import win32gui
I have also downloaded win32gui
but don't know how to make my script run. How can I run my Python script which imports win32gui
? When I run it, I get:
ImportError: No module named win32gui
Sorry for the newbie question but I'm trying to learn Python so don't know much about it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Windows 平台上,我通常会选择可执行文件。他们应该一直工作。尝试使用此处列出的文件之一:
http://sourceforge.net/projects/pywin32 /files/pywin32/Build216/
这是最新的版本。选择适合您的 Python 版本的版本。
When on a windows platform, I usually go for the executables. They should work all the time. Try perhaps one of the files listed here:
http://sourceforge.net/projects/pywin32/files/pywin32/Build216/
It's the most recent build. Choose the one appropriate to your Python's version.
这是 Marc Hammond 著名的 pywin32 扩展模块中的一个模块,您还可以轻松获取源代码并进行编译(我发现我需要这样做,因为我需要 64 位构建,但当时找不到) 。获取它的水银地址是:
http://pywin32.hg.sourceforge.net :8000/hgroot/pywin32/pywin32 .
\pywin32\win32 目录下有 Visual Studio 项目文件...
this is a module from Marc Hammond's well-known pywin32 extension module, you can also get the source and compile it quite easily (I found I needed to do this because I needed a 64 bit build and couldn't find one at the time). The mercurial address to get it is:
http://pywin32.hg.sourceforge.net:8000/hgroot/pywin32/pywin32
there are visual studio project files in the .\pywin32\win32 directory...