如何在 Python 中使用 win32gui 模块?

发布于 2024-11-19 11:41:50 字数 310 浏览 11 评论 0原文

在我的 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 技术交流群。

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

发布评论

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

评论(2

奈何桥上唱咆哮 2024-11-26 11:41:50

在 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.

木槿暧夏七纪年 2024-11-26 11:41:50

这是 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...

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