python - 使Python应用程序打开网页的命令

标签 python browser syntax-error webpage python-2.7

要使我编写的Python应用程序在默认浏览器中打开网页,我该怎么办?无需告知网页是什么或什么,它会打开我已经选择的网页。

我找到了一些文档here,但是我总是从URL中的符号中得到语法错误。有什么帮助吗?

最佳答案

URL必须在字符串中。

webbrowser.open('http://www.google.com/')

关于python - 使Python应用程序打开网页的命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6699201/

相关文章:

c# - 获取虚拟浏览器中的页面宽度和高度

mysql - mysql查询有什么问题?

python - python 3 TypeError : '>' not supported between instances of 'int' and 'str' in an if statment

jquery - 使用 Flask-Bootstrap 时在 jquery-ui 之前加载 jquery

python - 运行时警告 : invalid value encountered in power in scipy. 优化

python - pip install conda 后 Conda 损坏

php - Codeigniter 2.2 解析错误 : syntax error, 意外 T_CONSTANT_ENCAPSED_STRING

python - 你能判断一个数组是否是另一个数组的 View 吗?

java - 我应该看到带有文本/纯文本的标题吗?

html - 如何清除 html 页面的缓存?