python打开网页和暂停实例

WBOY
Release: 2016-06-16 08:41:24
Original
1229 people have browsed it

本文实例讲述了python打开网页和暂停的方法。分享给大家供大家参考。

具体实现代码如下:

import webbrowser import os webbrowser.open_new_tab("http://www.jb51.net/") os.system("pause")#运行windows的pause 命令,等待用户输入 i = 0 while i<100: if downloadUrlList == None: break webbrowser.open_new_tab(downloadUrlList.pop()) i = i + 1 if i % 10 == 0: os.system("pause")
Copy after login

运行本文实例后会弹出命令行窗口解析网页,紧接着打开http://www.jb51.net/的页面。

希望本文所述对大家的Python程序设计有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!