打开IE浏览器窗口 [英] Open IE Browser Window

查看:143
本文介绍了打开IE浏览器窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

web浏览器库提供了一个方便的方式来推出一个URL通过了 webbrowser.open()方法的浏览器窗口。众多的浏览器类型可供选择,但不会出现在Windows上运行蟒蛇时,启动Internet Explorer一个明确的方式。

The webbrowser library provides a convenient way to launch a URL with a browser window through the webbrowser.open() method. Numerous browser types are available, but there does not appear to be an explicit way to launch Internet Explorer when running python on windows.

WindowsDefault 仅在Internet Explorer设置为默认浏览器,这不是一个假设,我可以做的工作。

WindowsDefault only works if Internet Explorer is set as the default browser, which is not an assumption I can make.

有没有办法明确推出了网址到Internet Explorer中没有恢复到Windows API调用?

Is there a way to explicitly launch a URL into Internet Explorer without reverting to windows API calls?

推荐答案

更​​优雅code:

import webbrowser

ie = webbrowser.get(webbrowser.iexplore)
ie.open('google.com')

这篇关于打开IE浏览器窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆