例如,我想使用python(完全是webbrowser模块)在浏览器中打开HTML文件,但我希望该页面位于活动选项卡中,并且只应在整个Web浏览器中打开该页面的一个实例。 / p>
这是我使用
的简单python代码import webbrowser
def openWebPage(url):
webbrowser.open(url)
## before opening the html page i want to make sure
## it is not opened already, otherwise select it and make it the active tab
openWebPage('/var/www/html/index.html')