Webbrowser On Windows
M.E.Farmer
mefjr75 at hotmail.com
Mon May 2 01:10:04 EDT 2005
I played around with it.
############################################################################
import pythoncom
from win32com.client import Dispatch
############################################################################
def webbrowser(url=None):
ie = pythoncom.CoCreateInstance("InternetExplorer.Application",
None,
pythoncom.CLSCTX_SERVER,
pythoncom.IID_IDispatch)
ie = Dispatch(ie)
ie.Navigate
if url:
ie.Navigate(url)
ie.Visible = 1
return ie
#############################################################################
import time
w = webbrowser()
w.Navigate('http://www.google.com')
time.sleep(2)
w.Navigate('http://dir.gmane.org/gmane.comp.python.general')
time.sleep(2)
webbrowser('http://groups-beta.google.com/group/comp.lang.python?hl=en&lr=')
webbrowser('http://python.org')
#############################################################################
M.E.Farmer
More information about the Python-list
mailing list