webbrowser

The webbrowser module provides functions for opening documents in a web browser in a platform-independent manner. The module tries to determine the current browser using the environment settings of the local machine.

						open(url
						[,
						new])

Displays url with the default browser. If new is True, a new browser window is opened.

						open_new(url)

Displays url in a new window of the default browser. The same as open(url, True).

						get([name])

Returns a controller object for manipulating a browser. name is the name of the browser type and is typically a string such as ‘netscape’, ‘mozilla’, ‘kfm’, ‘grail’, ‘windows-default’, ‘internet-config’, or ‘command-line’. The returned controller object has the methods open() and open_new(), which accept the ...

Get Python: Essential Reference, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.