diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2009-12-24 02:54:53 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2009-12-24 02:54:53 (GMT) |
commit | 9c236bfb9ff9a076eb6047a89286d0d9f701048a (patch) | |
tree | 99c75ac7e2a5d84c35a20488af4068e3ae22a6fe /Doc/library | |
parent | f9a21f43c45eb23c953638c9c192e0053495bbc6 (diff) | |
download | cpython-9c236bfb9ff9a076eb6047a89286d0d9f701048a.zip cpython-9c236bfb9ff9a076eb6047a89286d0d9f701048a.tar.gz cpython-9c236bfb9ff9a076eb6047a89286d0d9f701048a.tar.bz2 |
Added markup and default arg, fixed example
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/webbrowser.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst index 53829c4..20f6231 100644 --- a/Doc/library/webbrowser.rst +++ b/Doc/library/webbrowser.rst @@ -18,10 +18,10 @@ available. If text-mode browsers are used, the calling process will block until the user exits the browser. If the environment variable :envvar:`BROWSER` exists, it is interpreted to -override the platform default list of browsers, as a os.pathsep-separated list -of browsers to try in order. When the value of a list part contains the string -``%s``, then it is interpreted as a literal browser command line to be used -with the argument URL substituted for ``%s``; if the part does not contain +override the platform default list of browsers, as a :data:`os.pathsep`-separated +list of browsers to try in order. When the value of a list part contains the +string ``%s``, then it is interpreted as a literal browser command line to be +used with the argument URL substituted for ``%s``; if the part does not contain ``%s``, it is simply interpreted as the name of the browser to launch. [1]_ For non-Unix platforms, or when a remote browser is available on Unix, the @@ -162,10 +162,10 @@ Notes: Here are some simple examples:: - url = 'http://www.python.org' + url = 'http://www.python.org/' # Open URL in a new tab, if a browser window is already open. - webbrowser.open_new_tab(url + '/doc') + webbrowser.open_new_tab(url + 'doc/') # Open URL in new window, raising the window if possible. webbrowser.open_new(url) @@ -180,7 +180,7 @@ Browser controllers provide these methods which parallel three of the module-level convenience functions: -.. method:: controller.open(url[, new[, autoraise=True]]) +.. method:: controller.open(url[, new=0[, autoraise=True]]) Display *url* using the browser handled by this controller. If *new* is 1, a new browser window is opened if possible. If *new* is 2, a new browser page ("tab") |