如何使用Python Webbrowser软件包关闭现有的浏览器选项卡 [英] How to close the existing browser tab using the Python webbrowser package
问题描述
使用Python Webbrowser软件包,我可以使用指定的URL打开一个新标签页.有没有办法关闭此标签?我引用了以下官方文档,但未提及与关闭动作相关的任何内容.
Using Python webbrowser package I can open a new tab with a specified URL. Is there a way to close this tab? I referred the below official docs and nothing related to close action is mentioned.
Python Webbrowser软件包文档: https://docs.python.org/3/library/webbrowser.html
Python webbrowser package doc: https://docs.python.org/3/library/webbrowser.html
推荐答案
不,webbrowser没有关闭选项卡的方法,也没有浏览器本身,就像您在其文档页面中看到的那样: https://docs.python.org/2/library/webbrowser.html
No, webbrowser doesn't have methods to close tabs nor browser itself as you may see in its documentation page: https://docs.python.org/2/library/webbrowser.html
这篇关于如何使用Python Webbrowser软件包关闭现有的浏览器选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!