rest25/library/webbrowser.rst => rest262/library/webbrowser.rst
44   Exception raised when a browser control error occurs.
45
46The following functions are defined:
47
48
49.. function:: open(url[, new=0[, autoraise=1]])
50
51   Display *url* using the default browser. If *new* is 0, the *url* is opened in
n52-   the same browser window.  If *new* is 1, a new browser window is opened if
n52+   the same browser window if possible.  If *new* is 1, a new browser window is
53-   possible.  If *new* is 2, a new browser page ("tab") is opened if possible.  If
53+   opened if possible.  If *new* is 2, a new browser page ("tab") is opened if
54-   *autoraise* is true, the window is raised if possible (note that under many
54+   possible.  If *autoraise* is true, the window is raised if possible (note that
55-   window managers this will occur regardless of the setting of this variable).
55+   under many window managers this will occur regardless of the setting of this
56+   variable).
57+ 
58+   Note that on some platforms, trying to open a filename using this function,
59+   may work and start the operating system's associated program.  However, this
60+   is neither supported nor portable.
56
57   .. versionchanged:: 2.5
58      *new* can now be 2.
59
60
61.. function:: open_new(url)
62
63   Open *url* in a new window of the default browser, if possible, otherwise, open
145   would be nice; the :envvar:`KDEDIR` variable is not sufficient.  Note also that
146   the name "kfm" is used even when using the :program:`konqueror` command with KDE
147   2 --- the implementation selects the best strategy for running Konqueror.
148
149(2)
150   Only on Windows platforms.
151
152(3)
n153-   Only on MacOS platforms; requires the standard MacPython :mod:`ic` module,
n158+   Only on Mac OS platforms; requires the standard MacPython :mod:`ic` module.
154-   described in the Macintosh Library Modules (XXX reference: ../mac/module-
155-   ic.html) manual.
156
157(4)
n158-   Only on MacOS X platform.
n161+   Only on Mac OS X platform.
159
160Here are some simple examples::
161
162   url = 'http://www.python.org'
163
n164-   # Open URL in a new tab, if a browser window is already open. 
n167+   # Open URL in a new tab, if a browser window is already open.
165   webbrowser.open_new_tab(url + '/doc')
166
167   # Open URL in new window, raising the window if possible.
168   webbrowser.open_new(url)
169
170
171.. _browser-controllers:
172
173Browser Controller Objects
174--------------------------
175
n176-Browser controllers provide two methods which parallel two of the module-level
n179+Browser controllers provide these methods which parallel two of the module-level
177convenience functions:
178
179
n180-.. function:: open(url[, new[, autoraise=1]])
n183+.. method:: controller.open(url[, new[, autoraise=1]])
181
182   Display *url* using the browser handled by this controller. If *new* is 1, a new
183   browser window is opened if possible. If *new* is 2, a new browser page ("tab")
184   is opened if possible.
185
186
n187-.. function:: open_new(url)
n190+.. method:: controller.open_new(url)
188
189   Open *url* in a new window of the browser handled by this controller, if
190   possible, otherwise, open *url* in the only browser window.  Alias
191   :func:`open_new`.
192
193
t194-.. function:: open_new_tab(url)
t197+.. method:: controller.open_new_tab(url)
195
196   Open *url* in a new page ("tab") of the browser handled by this controller, if
197   possible, otherwise equivalent to :func:`open_new`.
198
199   .. versionadded:: 2.5
200
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op