~dkuhlman/python-training-materials/Materials

« back to all changes in this revision

Viewing changes to python-3.5.2-docs-html/library/webbrowser.html

  • Committer: Dave Kuhlman
  • Date: 2017-04-15 16:24:56 UTC
  • Revision ID: dkuhlman@davekuhlman.org-20170415162456-iav9vozzg4iwqwv3
Updated docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
3
 
 
4
 
 
5
<html xmlns="http://www.w3.org/1999/xhtml">
 
6
  <head>
 
7
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
8
    
 
9
    <title>21.1. webbrowser — Convenient Web-browser controller &mdash; Python 3.5.2 documentation</title>
 
10
    
 
11
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
 
12
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 
13
    
 
14
    <script type="text/javascript">
 
15
      var DOCUMENTATION_OPTIONS = {
 
16
        URL_ROOT:    '../',
 
17
        VERSION:     '3.5.2',
 
18
        COLLAPSE_INDEX: false,
 
19
        FILE_SUFFIX: '.html',
 
20
        HAS_SOURCE:  true
 
21
      };
 
22
    </script>
 
23
    <script type="text/javascript" src="../_static/jquery.js"></script>
 
24
    <script type="text/javascript" src="../_static/underscore.js"></script>
 
25
    <script type="text/javascript" src="../_static/doctools.js"></script>
 
26
    <script type="text/javascript" src="../_static/sidebar.js"></script>
 
27
    <link rel="search" type="application/opensearchdescription+xml"
 
28
          title="Search within Python 3.5.2 documentation"
 
29
          href="../_static/opensearch.xml"/>
 
30
    <link rel="author" title="About these documents" href="../about.html" />
 
31
    <link rel="copyright" title="Copyright" href="../copyright.html" />
 
32
    <link rel="top" title="Python 3.5.2 documentation" href="../contents.html" />
 
33
    <link rel="up" title="21. Internet Protocols and Support" href="internet.html" />
 
34
    <link rel="next" title="21.2. cgi — Common Gateway Interface support" href="cgi.html" />
 
35
    <link rel="prev" title="21. Internet Protocols and Support" href="internet.html" />
 
36
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
 
37
    
 
38
    <script type="text/javascript" src="../_static/copybutton.js"></script>
 
39
    <script type="text/javascript" src="../_static/version_switch.js"></script>
 
40
    
 
41
    
 
42
 
 
43
 
 
44
  </head>
 
45
  <body role="document">  
 
46
    <div class="related" role="navigation" aria-label="related navigation">
 
47
      <h3>Navigation</h3>
 
48
      <ul>
 
49
        <li class="right" style="margin-right: 10px">
 
50
          <a href="../genindex.html" title="General Index"
 
51
             accesskey="I">index</a></li>
 
52
        <li class="right" >
 
53
          <a href="../py-modindex.html" title="Python Module Index"
 
54
             >modules</a> |</li>
 
55
        <li class="right" >
 
56
          <a href="cgi.html" title="21.2. cgi — Common Gateway Interface support"
 
57
             accesskey="N">next</a> |</li>
 
58
        <li class="right" >
 
59
          <a href="internet.html" title="21. Internet Protocols and Support"
 
60
             accesskey="P">previous</a> |</li>
 
61
        <li><img src="../_static/py.png" alt=""
 
62
                 style="vertical-align: middle; margin-top: -1px"/></li>
 
63
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
 
64
        <li>
 
65
          <span class="version_switcher_placeholder">3.5.2</span>
 
66
          <a href="../index.html">Documentation </a> &raquo;
 
67
        </li>
 
68
 
 
69
          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
 
70
          <li class="nav-item nav-item-2"><a href="internet.html" accesskey="U">21. Internet Protocols and Support</a> &raquo;</li>
 
71
    <li class="right">
 
72
        
 
73
 
 
74
    <div class="inline-search" style="display: none" role="search">
 
75
        <form class="inline-search" action="../search.html" method="get">
 
76
          <input placeholder="Quick search" type="text" name="q" />
 
77
          <input type="submit" value="Go" />
 
78
          <input type="hidden" name="check_keywords" value="yes" />
 
79
          <input type="hidden" name="area" value="default" />
 
80
        </form>
 
81
    </div>
 
82
    <script type="text/javascript">$('.inline-search').show(0);</script>
 
83
         |
 
84
    </li>
 
85
 
 
86
      </ul>
 
87
    </div>    
 
88
 
 
89
    <div class="document">
 
90
      <div class="documentwrapper">
 
91
        <div class="bodywrapper">
 
92
          <div class="body" role="main">
 
93
            
 
94
  <div class="section" id="module-webbrowser">
 
95
<span id="webbrowser-convenient-web-browser-controller"></span><h1>21.1. <a class="reference internal" href="#module-webbrowser" title="webbrowser: Easy-to-use controller for Web browsers."><code class="xref py py-mod docutils literal"><span class="pre">webbrowser</span></code></a> &#8212; Convenient Web-browser controller<a class="headerlink" href="#module-webbrowser" title="Permalink to this headline">¶</a></h1>
 
96
<p><strong>Source code:</strong> <a class="reference external" href="https://hg.python.org/cpython/file/3.5/Lib/webbrowser.py">Lib/webbrowser.py</a></p>
 
97
<hr class="docutils" />
 
98
<p>The <a class="reference internal" href="#module-webbrowser" title="webbrowser: Easy-to-use controller for Web browsers."><code class="xref py py-mod docutils literal"><span class="pre">webbrowser</span></code></a> module provides a high-level interface to allow displaying
 
99
Web-based documents to users. Under most circumstances, simply calling the
 
100
<a class="reference internal" href="#webbrowser.open" title="webbrowser.open"><code class="xref py py-func docutils literal"><span class="pre">open()</span></code></a> function from this module will do the right thing.</p>
 
101
<p>Under Unix, graphical browsers are preferred under X11, but text-mode browsers
 
102
will be used if graphical browsers are not available or an X11 display isn&#8217;t
 
103
available.  If text-mode browsers are used, the calling process will block until
 
104
the user exits the browser.</p>
 
105
<p>If the environment variable <span class="target" id="index-0"></span><code class="xref std std-envvar docutils literal"><span class="pre">BROWSER</span></code> exists, it is interpreted as the
 
106
<a class="reference internal" href="os.html#os.pathsep" title="os.pathsep"><code class="xref py py-data docutils literal"><span class="pre">os.pathsep</span></code></a>-separated list of browsers to try ahead of the platform
 
107
defaults.  When the value of a list part contains the string <code class="docutils literal"><span class="pre">%s</span></code>, then it is
 
108
interpreted as a literal browser command line to be used with the argument URL
 
109
substituted for <code class="docutils literal"><span class="pre">%s</span></code>; if the part does not contain <code class="docutils literal"><span class="pre">%s</span></code>, it is simply
 
110
interpreted as the name of the browser to launch. <a class="footnote-reference" href="#id2" id="id1">[1]</a></p>
 
111
<p>For non-Unix platforms, or when a remote browser is available on Unix, the
 
112
controlling process will not wait for the user to finish with the browser, but
 
113
allow the remote browser to maintain its own windows on the display.  If remote
 
114
browsers are not available on Unix, the controlling process will launch a new
 
115
browser and wait.</p>
 
116
<p>The script <strong class="program">webbrowser</strong> can be used as a command-line interface for the
 
117
module. It accepts a URL as the argument. It accepts the following optional
 
118
parameters: <code class="docutils literal"><span class="pre">-n</span></code> opens the URL in a new browser window, if possible;
 
119
<code class="docutils literal"><span class="pre">-t</span></code> opens the URL in a new browser page (&#8220;tab&#8221;). The options are,
 
120
naturally, mutually exclusive.  Usage example:</p>
 
121
<div class="highlight-python3"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">webbrowser</span> <span class="o">-</span><span class="n">t</span> <span class="s2">&quot;http://www.python.org&quot;</span>
 
122
</pre></div>
 
123
</div>
 
124
<p>The following exception is defined:</p>
 
125
<dl class="exception">
 
126
<dt id="webbrowser.Error">
 
127
<em class="property">exception </em><code class="descclassname">webbrowser.</code><code class="descname">Error</code><a class="headerlink" href="#webbrowser.Error" title="Permalink to this definition">¶</a></dt>
 
128
<dd><p>Exception raised when a browser control error occurs.</p>
 
129
</dd></dl>
 
130
 
 
131
<p>The following functions are defined:</p>
 
132
<dl class="function">
 
133
<dt id="webbrowser.open">
 
134
<code class="descclassname">webbrowser.</code><code class="descname">open</code><span class="sig-paren">(</span><em>url</em>, <em>new=0</em>, <em>autoraise=True</em><span class="sig-paren">)</span><a class="headerlink" href="#webbrowser.open" title="Permalink to this definition">¶</a></dt>
 
135
<dd><p>Display <em>url</em> using the default browser. If <em>new</em> is 0, the <em>url</em> is opened
 
136
in the same browser window if possible.  If <em>new</em> is 1, a new browser window
 
137
is opened if possible.  If <em>new</em> is 2, a new browser page (&#8220;tab&#8221;) is opened
 
138
if possible.  If <em>autoraise</em> is <code class="docutils literal"><span class="pre">True</span></code>, the window is raised if possible
 
139
(note that under many window managers this will occur regardless of the
 
140
setting of this variable).</p>
 
141
<p>Note that on some platforms, trying to open a filename using this function,
 
142
may work and start the operating system&#8217;s associated program.  However, this
 
143
is neither supported nor portable.</p>
 
144
</dd></dl>
 
145
 
 
146
<dl class="function">
 
147
<dt id="webbrowser.open_new">
 
148
<code class="descclassname">webbrowser.</code><code class="descname">open_new</code><span class="sig-paren">(</span><em>url</em><span class="sig-paren">)</span><a class="headerlink" href="#webbrowser.open_new" title="Permalink to this definition">¶</a></dt>
 
149
<dd><p>Open <em>url</em> in a new window of the default browser, if possible, otherwise, open
 
150
<em>url</em> in the only browser window.</p>
 
151
</dd></dl>
 
152
 
 
153
<dl class="function">
 
154
<dt id="webbrowser.open_new_tab">
 
155
<code class="descclassname">webbrowser.</code><code class="descname">open_new_tab</code><span class="sig-paren">(</span><em>url</em><span class="sig-paren">)</span><a class="headerlink" href="#webbrowser.open_new_tab" title="Permalink to this definition">¶</a></dt>
 
156
<dd><p>Open <em>url</em> in a new page (&#8220;tab&#8221;) of the default browser, if possible, otherwise
 
157
equivalent to <a class="reference internal" href="#webbrowser.open_new" title="webbrowser.open_new"><code class="xref py py-func docutils literal"><span class="pre">open_new()</span></code></a>.</p>
 
158
</dd></dl>
 
159
 
 
160
<dl class="function">
 
161
<dt id="webbrowser.get">
 
162
<code class="descclassname">webbrowser.</code><code class="descname">get</code><span class="sig-paren">(</span><em>using=None</em><span class="sig-paren">)</span><a class="headerlink" href="#webbrowser.get" title="Permalink to this definition">¶</a></dt>
 
163
<dd><p>Return a controller object for the browser type <em>using</em>.  If <em>using</em> is
 
164
<code class="docutils literal"><span class="pre">None</span></code>, return a controller for a default browser appropriate to the
 
165
caller&#8217;s environment.</p>
 
166
</dd></dl>
 
167
 
 
168
<dl class="function">
 
169
<dt id="webbrowser.register">
 
170
<code class="descclassname">webbrowser.</code><code class="descname">register</code><span class="sig-paren">(</span><em>name</em>, <em>constructor</em>, <em>instance=None</em><span class="sig-paren">)</span><a class="headerlink" href="#webbrowser.register" title="Permalink to this definition">¶</a></dt>
 
171
<dd><p>Register the browser type <em>name</em>.  Once a browser type is registered, the
 
172
<a class="reference internal" href="#webbrowser.get" title="webbrowser.get"><code class="xref py py-func docutils literal"><span class="pre">get()</span></code></a> function can return a controller for that browser type.  If
 
173
<em>instance</em> is not provided, or is <code class="docutils literal"><span class="pre">None</span></code>, <em>constructor</em> will be called without
 
174
parameters to create an instance when needed.  If <em>instance</em> is provided,
 
175
<em>constructor</em> will never be called, and may be <code class="docutils literal"><span class="pre">None</span></code>.</p>
 
176
<p>This entry point is only useful if you plan to either set the <span class="target" id="index-1"></span><code class="xref std std-envvar docutils literal"><span class="pre">BROWSER</span></code>
 
177
variable or call <a class="reference internal" href="#webbrowser.get" title="webbrowser.get"><code class="xref py py-func docutils literal"><span class="pre">get()</span></code></a> with a nonempty argument matching the name of a
 
178
handler you declare.</p>
 
179
</dd></dl>
 
180
 
 
181
<p>A number of browser types are predefined.  This table gives the type names that
 
182
may be passed to the <a class="reference internal" href="#webbrowser.get" title="webbrowser.get"><code class="xref py py-func docutils literal"><span class="pre">get()</span></code></a> function and the corresponding instantiations
 
183
for the controller classes, all defined in this module.</p>
 
184
<table border="1" class="docutils">
 
185
<colgroup>
 
186
<col width="33%" />
 
187
<col width="57%" />
 
188
<col width="10%" />
 
189
</colgroup>
 
190
<thead valign="bottom">
 
191
<tr class="row-odd"><th class="head">Type Name</th>
 
192
<th class="head">Class Name</th>
 
193
<th class="head">Notes</th>
 
194
</tr>
 
195
</thead>
 
196
<tbody valign="top">
 
197
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'mozilla'</span></code></td>
 
198
<td><code class="xref py py-class docutils literal"><span class="pre">Mozilla('mozilla')</span></code></td>
 
199
<td>&nbsp;</td>
 
200
</tr>
 
201
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'firefox'</span></code></td>
 
202
<td><code class="xref py py-class docutils literal"><span class="pre">Mozilla('mozilla')</span></code></td>
 
203
<td>&nbsp;</td>
 
204
</tr>
 
205
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'netscape'</span></code></td>
 
206
<td><code class="xref py py-class docutils literal"><span class="pre">Mozilla('netscape')</span></code></td>
 
207
<td>&nbsp;</td>
 
208
</tr>
 
209
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'galeon'</span></code></td>
 
210
<td><code class="xref py py-class docutils literal"><span class="pre">Galeon('galeon')</span></code></td>
 
211
<td>&nbsp;</td>
 
212
</tr>
 
213
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'epiphany'</span></code></td>
 
214
<td><code class="xref py py-class docutils literal"><span class="pre">Galeon('epiphany')</span></code></td>
 
215
<td>&nbsp;</td>
 
216
</tr>
 
217
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'skipstone'</span></code></td>
 
218
<td><code class="xref py py-class docutils literal"><span class="pre">BackgroundBrowser('skipstone')</span></code></td>
 
219
<td>&nbsp;</td>
 
220
</tr>
 
221
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'kfmclient'</span></code></td>
 
222
<td><code class="xref py py-class docutils literal"><span class="pre">Konqueror()</span></code></td>
 
223
<td>(1)</td>
 
224
</tr>
 
225
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'konqueror'</span></code></td>
 
226
<td><code class="xref py py-class docutils literal"><span class="pre">Konqueror()</span></code></td>
 
227
<td>(1)</td>
 
228
</tr>
 
229
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'kfm'</span></code></td>
 
230
<td><code class="xref py py-class docutils literal"><span class="pre">Konqueror()</span></code></td>
 
231
<td>(1)</td>
 
232
</tr>
 
233
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'mosaic'</span></code></td>
 
234
<td><code class="xref py py-class docutils literal"><span class="pre">BackgroundBrowser('mosaic')</span></code></td>
 
235
<td>&nbsp;</td>
 
236
</tr>
 
237
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'opera'</span></code></td>
 
238
<td><code class="xref py py-class docutils literal"><span class="pre">Opera()</span></code></td>
 
239
<td>&nbsp;</td>
 
240
</tr>
 
241
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'grail'</span></code></td>
 
242
<td><code class="xref py py-class docutils literal"><span class="pre">Grail()</span></code></td>
 
243
<td>&nbsp;</td>
 
244
</tr>
 
245
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'links'</span></code></td>
 
246
<td><code class="xref py py-class docutils literal"><span class="pre">GenericBrowser('links')</span></code></td>
 
247
<td>&nbsp;</td>
 
248
</tr>
 
249
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'elinks'</span></code></td>
 
250
<td><code class="xref py py-class docutils literal"><span class="pre">Elinks('elinks')</span></code></td>
 
251
<td>&nbsp;</td>
 
252
</tr>
 
253
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'lynx'</span></code></td>
 
254
<td><code class="xref py py-class docutils literal"><span class="pre">GenericBrowser('lynx')</span></code></td>
 
255
<td>&nbsp;</td>
 
256
</tr>
 
257
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'w3m'</span></code></td>
 
258
<td><code class="xref py py-class docutils literal"><span class="pre">GenericBrowser('w3m')</span></code></td>
 
259
<td>&nbsp;</td>
 
260
</tr>
 
261
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'windows-default'</span></code></td>
 
262
<td><code class="xref py py-class docutils literal"><span class="pre">WindowsDefault</span></code></td>
 
263
<td>(2)</td>
 
264
</tr>
 
265
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'macosx'</span></code></td>
 
266
<td><code class="xref py py-class docutils literal"><span class="pre">MacOSX('default')</span></code></td>
 
267
<td>(3)</td>
 
268
</tr>
 
269
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'safari'</span></code></td>
 
270
<td><code class="xref py py-class docutils literal"><span class="pre">MacOSX('safari')</span></code></td>
 
271
<td>(3)</td>
 
272
</tr>
 
273
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'google-chrome'</span></code></td>
 
274
<td><code class="xref py py-class docutils literal"><span class="pre">Chrome('google-chrome')</span></code></td>
 
275
<td>&nbsp;</td>
 
276
</tr>
 
277
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'chrome'</span></code></td>
 
278
<td><code class="xref py py-class docutils literal"><span class="pre">Chrome('chrome')</span></code></td>
 
279
<td>&nbsp;</td>
 
280
</tr>
 
281
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">'chromium'</span></code></td>
 
282
<td><code class="xref py py-class docutils literal"><span class="pre">Chromium('chromium')</span></code></td>
 
283
<td>&nbsp;</td>
 
284
</tr>
 
285
<tr class="row-even"><td><code class="docutils literal"><span class="pre">'chromium-browser'</span></code></td>
 
286
<td><code class="xref py py-class docutils literal"><span class="pre">Chromium('chromium-browser')</span></code></td>
 
287
<td>&nbsp;</td>
 
288
</tr>
 
289
</tbody>
 
290
</table>
 
291
<p>Notes:</p>
 
292
<ol class="arabic simple">
 
293
<li>&#8220;Konqueror&#8221; is the file manager for the KDE desktop environment for Unix, and
 
294
only makes sense to use if KDE is running.  Some way of reliably detecting KDE
 
295
would be nice; the <span class="target" id="index-2"></span><code class="xref std std-envvar docutils literal"><span class="pre">KDEDIR</span></code> variable is not sufficient.  Note also that
 
296
the name &#8220;kfm&#8221; is used even when using the <strong class="program">konqueror</strong> command with KDE
 
297
2 &#8212; the implementation selects the best strategy for running Konqueror.</li>
 
298
<li>Only on Windows platforms.</li>
 
299
<li>Only on Mac OS X platform.</li>
 
300
</ol>
 
301
<div class="versionadded">
 
302
<p><span class="versionmodified">New in version 3.3: </span>Support for Chrome/Chromium has been added.</p>
 
303
</div>
 
304
<p>Here are some simple examples:</p>
 
305
<div class="highlight-python3"><div class="highlight"><pre><span></span><span class="n">url</span> <span class="o">=</span> <span class="s1">&#39;http://docs.python.org/&#39;</span>
 
306
 
 
307
<span class="c1"># Open URL in a new tab, if a browser window is already open.</span>
 
308
<span class="n">webbrowser</span><span class="o">.</span><span class="n">open_new_tab</span><span class="p">(</span><span class="n">url</span><span class="p">)</span>
 
309
 
 
310
<span class="c1"># Open URL in new window, raising the window if possible.</span>
 
311
<span class="n">webbrowser</span><span class="o">.</span><span class="n">open_new</span><span class="p">(</span><span class="n">url</span><span class="p">)</span>
 
312
</pre></div>
 
313
</div>
 
314
<div class="section" id="browser-controller-objects">
 
315
<span id="browser-controllers"></span><h2>21.1.1. Browser Controller Objects<a class="headerlink" href="#browser-controller-objects" title="Permalink to this headline">¶</a></h2>
 
316
<p>Browser controllers provide these methods which parallel three of the
 
317
module-level convenience functions:</p>
 
318
<dl class="method">
 
319
<dt id="webbrowser.controller.open">
 
320
<code class="descclassname">controller.</code><code class="descname">open</code><span class="sig-paren">(</span><em>url</em>, <em>new=0</em>, <em>autoraise=True</em><span class="sig-paren">)</span><a class="headerlink" href="#webbrowser.controller.open" title="Permalink to this definition">¶</a></dt>
 
321
<dd><p>Display <em>url</em> using the browser handled by this controller. If <em>new</em> is 1, a new
 
322
browser window is opened if possible. If <em>new</em> is 2, a new browser page (&#8220;tab&#8221;)
 
323
is opened if possible.</p>
 
324
</dd></dl>
 
325
 
 
326
<dl class="method">
 
327
<dt id="webbrowser.controller.open_new">
 
328
<code class="descclassname">controller.</code><code class="descname">open_new</code><span class="sig-paren">(</span><em>url</em><span class="sig-paren">)</span><a class="headerlink" href="#webbrowser.controller.open_new" title="Permalink to this definition">¶</a></dt>
 
329
<dd><p>Open <em>url</em> in a new window of the browser handled by this controller, if
 
330
possible, otherwise, open <em>url</em> in the only browser window.  Alias
 
331
<a class="reference internal" href="#webbrowser.open_new" title="webbrowser.open_new"><code class="xref py py-func docutils literal"><span class="pre">open_new()</span></code></a>.</p>
 
332
</dd></dl>
 
333
 
 
334
<dl class="method">
 
335
<dt id="webbrowser.controller.open_new_tab">
 
336
<code class="descclassname">controller.</code><code class="descname">open_new_tab</code><span class="sig-paren">(</span><em>url</em><span class="sig-paren">)</span><a class="headerlink" href="#webbrowser.controller.open_new_tab" title="Permalink to this definition">¶</a></dt>
 
337
<dd><p>Open <em>url</em> in a new page (&#8220;tab&#8221;) of the browser handled by this controller, if
 
338
possible, otherwise equivalent to <a class="reference internal" href="#webbrowser.open_new" title="webbrowser.open_new"><code class="xref py py-func docutils literal"><span class="pre">open_new()</span></code></a>.</p>
 
339
</dd></dl>
 
340
 
 
341
<p class="rubric">Footnotes</p>
 
342
<table class="docutils footnote" frame="void" id="id2" rules="none">
 
343
<colgroup><col class="label" /><col /></colgroup>
 
344
<tbody valign="top">
 
345
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>Executables named here without a full path will be searched in the
 
346
directories given in the <span class="target" id="index-3"></span><code class="xref std std-envvar docutils literal"><span class="pre">PATH</span></code> environment variable.</td></tr>
 
347
</tbody>
 
348
</table>
 
349
</div>
 
350
</div>
 
351
 
 
352
 
 
353
          </div>
 
354
        </div>
 
355
      </div>
 
356
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
 
357
        <div class="sphinxsidebarwrapper">
 
358
  <h3><a href="../contents.html">Table Of Contents</a></h3>
 
359
  <ul>
 
360
<li><a class="reference internal" href="#">21.1. <code class="docutils literal"><span class="pre">webbrowser</span></code> &#8212; Convenient Web-browser controller</a><ul>
 
361
<li><a class="reference internal" href="#browser-controller-objects">21.1.1. Browser Controller Objects</a></li>
 
362
</ul>
 
363
</li>
 
364
</ul>
 
365
 
 
366
  <h4>Previous topic</h4>
 
367
  <p class="topless"><a href="internet.html"
 
368
                        title="previous chapter">21. Internet Protocols and Support</a></p>
 
369
  <h4>Next topic</h4>
 
370
  <p class="topless"><a href="cgi.html"
 
371
                        title="next chapter">21.2. <code class="docutils literal"><span class="pre">cgi</span></code> &#8212; Common Gateway Interface support</a></p>
 
372
  <div role="note" aria-label="source link">
 
373
    <h3>This Page</h3>
 
374
    <ul class="this-page-menu">
 
375
      <li><a href="../bugs.html">Report a Bug</a></li>
 
376
      <li><a href="../_sources/library/webbrowser.txt"
 
377
            rel="nofollow">Show Source</a></li>
 
378
    </ul>
 
379
  </div>
 
380
        </div>
 
381
      </div>
 
382
      <div class="clearer"></div>
 
383
    </div>  
 
384
    <div class="related" role="navigation" aria-label="related navigation">
 
385
      <h3>Navigation</h3>
 
386
      <ul>
 
387
        <li class="right" style="margin-right: 10px">
 
388
          <a href="../genindex.html" title="General Index"
 
389
             >index</a></li>
 
390
        <li class="right" >
 
391
          <a href="../py-modindex.html" title="Python Module Index"
 
392
             >modules</a> |</li>
 
393
        <li class="right" >
 
394
          <a href="cgi.html" title="21.2. cgi — Common Gateway Interface support"
 
395
             >next</a> |</li>
 
396
        <li class="right" >
 
397
          <a href="internet.html" title="21. Internet Protocols and Support"
 
398
             >previous</a> |</li>
 
399
        <li><img src="../_static/py.png" alt=""
 
400
                 style="vertical-align: middle; margin-top: -1px"/></li>
 
401
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
 
402
        <li>
 
403
          <span class="version_switcher_placeholder">3.5.2</span>
 
404
          <a href="../index.html">Documentation </a> &raquo;
 
405
        </li>
 
406
 
 
407
          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
 
408
          <li class="nav-item nav-item-2"><a href="internet.html" >21. Internet Protocols and Support</a> &raquo;</li>
 
409
    <li class="right">
 
410
        
 
411
 
 
412
    <div class="inline-search" style="display: none" role="search">
 
413
        <form class="inline-search" action="../search.html" method="get">
 
414
          <input placeholder="Quick search" type="text" name="q" />
 
415
          <input type="submit" value="Go" />
 
416
          <input type="hidden" name="check_keywords" value="yes" />
 
417
          <input type="hidden" name="area" value="default" />
 
418
        </form>
 
419
    </div>
 
420
    <script type="text/javascript">$('.inline-search').show(0);</script>
 
421
         |
 
422
    </li>
 
423
 
 
424
      </ul>
 
425
    </div>  
 
426
    <div class="footer">
 
427
    &copy; <a href="../copyright.html">Copyright</a> 2001-2016, Python Software Foundation.
 
428
    <br />
 
429
    The Python Software Foundation is a non-profit corporation.
 
430
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
 
431
    <br />
 
432
    Last updated on Sep 23, 2016.
 
433
    <a href="../bugs.html">Found a bug</a>?
 
434
    <br />
 
435
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.3.
 
436
    </div>
 
437
 
 
438
  </body>
 
439
</html>
 
 
b'\\ No newline at end of file'