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)