您如何在Python代码中更改Windows控制台图标?
我可以将此代码添加到我的 python 脚本中来配置 Windows 控制台。 如何更改默认的 Windows 控制台图标?
os.system('模式 con: cols=90 行=28')
I can add this code to my python script to configure the windows console.
How do you change the default windows console icon?
os.system('mode con: cols=90 lines=28')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以更改窗口的图标,但您需要知道窗口的标题。下面是一些代码,用于设置标题,等待其应用,然后更新图标。
如果您想在
set_window_title
中设置标题时添加唯一 ID 或类似的内容,则会传回window_title
变量。You can change the icon of the window, but you need to know the window's title. Here's some code that will set the title, wait for it to apply, then update the icon.
The
window_title
variable is passed back in case you wanted to add a unique ID or something similar when the title is set inset_window_title
.