Python‎ > ‎webbrowser‎ > ‎

webbrowser.get()

http://www.adilwaseem.com/

Definition
Return instance for the default browser of the system,

Syntax
webbrowser.get()

Examples
The browser open the internet explorer in opening the url.
>>>import webbrowser 
>>> r=webbrowser.get('C:\Program Files\Internet Explorer\iexplore.exe')
>>> r.open_new('www.pythonlake.com')
True
>>> 

The browser open url in the default browser.
 
>>> import webbrowser
>>> r=webbrowser.get()
>>> r.open_new_tab('www.pythonlake.com')
True
>>> 

 >>> webbrowser.get()
<webbrowser.WindowsDefault object at 0x000000000430A780>
Comments