Webbrowser Module

suggest change

Introduction

According to Python’s standard documentation, the webbrowser module provides a high-level interface to allow displaying Web-based documents to users. This topic explains and demonstrates proper usage of the webbrowser module.

Syntax

Parameters

| Parameter | Details | | ——— | —–– | |webbrowser.open()| | | url | the URL to open in the web browser | | new | 0 opens the URL in the existing tab, 1 opens in a new window, 2 opens in new tab| | autoraise | if set to True, the window will be moved on top of the other windows | |webbrowser.open_new()| | | url | the URL to open in the web browser | |webbrowser.open_new_tab()| | | url | the URL to open in the web browser |webbrowser.get()| | | using | the browser to use | |webbrowser.register()| | | url | browser name | | constructor | path to the executable browser (help) | | instance | An instance of a web browser returned from the webbrowser.get() method |

Remarks

The following table lists predefined browser types. The left column are names that can be passed into the webbrowser.get() method and the right column lists the class names for each browser type.

| Type Name | Class Name | |––––––––––|––––––––––––––––| | 'mozilla' | Mozilla('mozilla') | | 'firefox' | Mozilla('mozilla') | | 'netscape' | Mozilla('netscape') | | 'galeon' | Galeon('galeon') | | 'epiphany' | Galeon('epiphany') | | 'skipstone' | BackgroundBrowser('skipstone') | | 'kfmclient' | Konqueror() | | 'konqueror' | Konqueror() | | 'kfm' | Konqueror() | | 'mosaic' | BackgroundBrowser('mosaic') | | 'opera' | Opera() | | 'grail' | Grail() | | 'links' | GenericBrowser('links') | | 'elinks' | Elinks('elinks') | | 'lynx' | GenericBrowser('lynx') | | 'w3m' | GenericBrowser('w3m') | | 'windows-default' | WindowsDefault | | 'macosx' | MacOSX('default') | | 'safari' | MacOSX('safari') | | 'google-chrome' | Chrome('google-chrome') | | 'chrome' | Chrome('chrome') | | 'chromium' | Chromium('chromium') | | 'chromium-browser' | Chromium('chromium-browser') |

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


webbrowser module:
* Webbrowser Module

Table Of Contents
2 Filter
3 List
7 Loops
22 Reduce
27 Classes
31 Set
42 Tuple
45 Enum
62 Sockets
89 urllib
92 Idioms
104 Stack
105 Profiling
109 Logging
111 os module
118 Mixins
120 ArcPy
126 Arrays
132 2to3 tool
135 Unicode
138 Neo4j
140 Curses
141 Templates
145 heapq
146 tkinter
154 Audio
155 pyglet
157 ijson
158 webbrowser module
160 Flask
161 Groupby
163 pygame
165 hashlib
166 Gzip
167 ctypes
185 pyaudio
186 shelve