Source code:Lib/webbrowser.py
The webbrowser module provides a high-level interface to allow displayingWeb-based documents to users. Under most circumstances, simply calling theopen() function from this module will do the right thing.
Under Unix, graphical browsers are preferred under X11, but text-mode browserswill be used if graphical browsers are not available or an X11 display isn’tavailable. If text-mode browsers are used, the calling process will block untilthe user exits the browser.
- The webbrowser module provides a high-level interface to allow displaying Web-based documents to users. Under most circumstances, simply calling the open function from this module will do the right thing. Under Unix, graphical browsers are preferred under X11, but text-mode browsers will be used if graphical browsers are not available or an X11 display isn’t available.
- Jul 25, 2011 Sport Stacking is an exciting individual and team sport where participants stack and un stack 12 specially designed plastic cups in pre-determined sequence. Check out all 6 parts for stacking tips.
Release Notes – Maven 3.3.3 Maven 3.3.3. The Apache Maven team would like to announce the release of Maven 3.3.3. Maven 3.3.3 is available for download. Maven is a software project management and comprehension tool.
![Crypho Crypho](/uploads/1/2/6/4/126422390/747709037.png)
If the environment variable BROWSER exists, it is interpreted tooverride the platform default list of browsers, as a os.pathsep-separatedlist of browsers to try in order. When the value of a list part contains thestring %s, then it is interpreted as a literal browser command line to beused 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, thecontrolling process will not wait for the user to finish with the browser, butallow the remote browser to maintain its own windows on the display. If remotebrowsers are not available on Unix, the controlling process will launch a newbrowser and wait.
The script webbrowser can be used as a command-line interface for themodule. It accepts an URL as the argument. It accepts the following optionalparameters: -n opens the URL in a new browser window, if possible;-t opens the URL in a new browser page (“tab”). The options are,naturally, mutually exclusive. Usage example:
The following exception is defined:
Exception raised when a browser control error occurs.
The following functions are defined:
Display url using the default browser. If new is 0, the url is openedin the same browser window if possible. If new is 1, a new browser windowis opened if possible. If new is 2, a new browser page (“tab”) is openedif possible. If autoraise is True, the window is raised if possible(note that under many window managers this will occur regardless of thesetting of this variable).
Note that on some platforms, trying to open a filename using this function,may work and start the operating system’s associated program. However, thisis neither supported nor portable.
Open url in a new window of the default browser, if possible, otherwise, openurl in the only browser window.
Open url in a new page (“tab”) of the default browser, if possible, otherwiseequivalent to open_new().
Return a controller object for the browser type using. If using isNone, return a controller for a default browser appropriate to thecaller’s environment.
Register the browser type name. Once a browser type is registered, theget() function can return a controller for that browser type. Ifinstance is not provided, or is None, constructor will be called withoutparameters to create an instance when needed. If instance is provided,constructor will never be called, and may be None.
This entry point is only useful if you plan to either set the BROWSERvariable or call get() with a nonempty argument matching the name of ahandler you declare.
A number of browser types are predefined. This table gives the type names thatmay be passed to the get() function and the corresponding instantiationsfor the controller classes, all defined in this module.
Type Name | Class Name | Notes |
---|---|---|
'mozilla' | Mozilla('mozilla') | |
'firefox' | Mozilla('mozilla') | |
'netscape' | Mozilla('netscape') | |
'galeon' | Galeon('galeon') | |
'epiphany' | Galeon('epiphany') | |
'skipstone' | BackgroundBrowser('skipstone') | |
'kfmclient' | Konqueror() | (1) |
'konqueror' | Konqueror() | (1) |
'kfm' | Konqueror() | (1) |
'mosaic' | BackgroundBrowser('mosaic') | |
'opera' | Opera() | |
'grail' | Grail() | |
'links' | GenericBrowser('links') | |
'elinks' | Elinks('elinks') | |
'lynx' | GenericBrowser('lynx') | |
'w3m' | GenericBrowser('w3m') | |
'windows-default' | WindowsDefault | (2) |
'macosx' | MacOSX('default') | (3) |
'safari' | MacOSX('safari') | (3) |
'google-chrome' | Chrome('google-chrome') | |
'chrome' | Chrome('chrome') | |
'chromium' | Chromium('chromium') | |
'chromium-browser' | Chromium('chromium-browser') |
Notes:
- “Konqueror” is the file manager for the KDE desktop environment for Unix, andonly makes sense to use if KDE is running. Some way of reliably detecting KDEwould be nice; the KDEDIR variable is not sufficient. Note also thatthe name “kfm” is used even when using the konqueror command with KDE2 — the implementation selects the best strategy for running Konqueror.
- Only on Windows platforms.
- Only on Mac OS X platform.
New in version 3.3: Support for Chrome/Chromium has been added.
Here are some simple examples:
21.1.1. Browser Controller Objects¶
Browser controllers provide these methods which parallel three of themodule-level convenience functions:
Display url using the browser handled by this controller. If new is 1, a newbrowser window is opened if possible. If new is 2, a new browser page (“tab”)is opened if possible.
![3.3.3 3.3.3](/uploads/1/2/6/4/126422390/724302660.png)
Open url in a new window of the browser handled by this controller, ifpossible, otherwise, open url in the only browser window. Aliasopen_new().
Open url in a new page (“tab”) of the browser handled by this controller, ifpossible, otherwise equivalent to open_new().
Footnotes
[1] | Executables named here without a full path will be searched in thedirectories given in the PATH environment variable. |
Maven 3.3.3
The Apache Maven team would like to announce the release of Maven 3.3.3.
Crypto 3 3 3 Download
Maven 3.3.3 is available for download.
Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central place.
Maven 3 aims to ensure backward compatibility with Maven 2, improve usability, increase performance, allow safe embedding, and pave the way to implement many highly demanded features.
The core release is independent of the plugins available. Further releases of plugins will be made separately. See the PluginList for more information.
We hope you enjoy using Maven! If you have any questions, please consult:
- the web site: http://maven.apache.org/
- the maven-user mailing list: http://maven.apache.org/mailing-lists.html
- the reference documentation: http://maven.apache.org/ref/3.3.3/
Crypto 3 3 32
The full list of changes can be found in our issue management system.