python 练习1 指定浏览器打开特定URL

View Code
import os

url = 'www.baidu.com'
command1 = '"D:\Program Files\Opera_12.11\opera.exe" %s' % url
command2 = '"C:\Program Files\Google\Chrome\Application\chrome.exe" %s' % url
command3 = '"D:\Program Files\Mozilla Firefox\\firefox.exe" %s' % url
os.system(command1)
os.system(command2)
os.system(command3)

 

posted @ 2013-04-30 17:32  Cool7  阅读(181)  评论(0编辑  收藏  举报