如何运行python脚本,一键显示自动登录的网页

我有我的python脚本,我觉得很好。我想将脚本保留在桌面上,只需点击一下我就可以运行脚本并打开浏览器(IE或firefox或chrome)并执行脚本即登录网站。
import urllib, urllib2, cookielib 

username = 'xyzusername' 
password = 'xyzpassword' 

cj = cookielib.CookieJar() 

opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) 

login_data = urllib.urlencode({'userid' : username, 'pass' : password}) 

resp = opener.open('http://www.gmail.com') 

resp.read()

print resp
我该如何运行脚本?请帮忙。     
已邀请:
嗯,你的脚本登录到一个网站,但它没有打开浏览器。 如果你想打开一个浏览器,你可能最好看看Selenium: http://coreygoldberg.blogspot.com/2009/09/selenium-rc-with-python-in-30-seconds.html http://jimmyg.org/blog/2009/getting-started-with-selenium-and-python.html http://seleniumhq.org/     

要回复问题请先登录注册