Python中文
首页
教程
问答
标签
搜索
登录
注册
windows上python pyautogui的屏幕截图如何防止打开shell或cmd
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我想用pyautogui拍摄python的屏幕截图。这是我的代码:</p> <pre><code>import pyautogui im1 = pyautogui.screenshot("my_screen.png") </code></pre> <p>我的问题是,这样一来,我屏幕的一半被python shell阻塞了,当我启动代码时,它会弹出。所以这张照片并不是一张截图。在此之前,我使用python.exe运行python文件,然后问题是出现了cmd窗口。现在我使用pythonw.exe,因为这显然阻止了cmd窗口的显示,但现在pythonshell窗口阻止了我的屏幕</p> <p>有人知道我怎么能拍出清晰的截图吗</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>嗯,解决办法很简单。在尝试用枕头截图之后,我得到了同样的结果。所以answear是Spyder的配置,我正在使用它。在配置和“运行”下,您可以更改代码的运行位置。我选择了在外部窗口中运行代码。所以我改成了内部的,一切正常</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
文本导入时标题行中的特殊字符
2 回答
文本小部件:在没有输入时更新并在循环后保持空闲
3 回答
文本小部件tkin
4 回答
文本小部件tkinter中的标签更改或文本外观更改是否有撤消功能?
2 回答
文本小部件tkinter复制图像选项
7 回答
文本小部件上的Python Tkinter ttk滚动条未缩放
4 回答
文本小部件上的滚动条可能需要根据制表符ord显示前进行滚动
5 回答
文本小部件不显示lis中的内容
8 回答
文本小部件不显示Unicode字符
9 回答
文本小部件中写入的行间距
1 回答
文本小部件中的文本作为变量
5 回答
文本小部件中的滚动条仅显示在底部
6 回答
文本小部件中的选项卡键空间计数
7 回答
文本小部件作为Lis
2 回答
文本小部件在主框架中扩展列宽
6 回答
文本小部件未使用删除功能清除
3 回答
文本小部件滚动动画(Tkinter、Python)
5 回答
文本居中。格式正确吗?
8 回答
文本差分算法
4 回答
文本已知时音频文件中的单词索引
7 回答