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.
The official home of the Python Programming Language. Python 3.3.5. Release Date: March 9, 2014 Python 3.3.5 was released on March 9th, 2014. Python 3.3.5 includes fixes for these important issues. Python runs on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm Handhelds, and Nokia mobile phones. Python has also been ported to the Java and.NET virtual machines. Python is distributed under an OSI-approved open source license that makes it free to use, even for commercial products.
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.
If the environment variable
BROWSER exists, it is interpreted as theos.pathsep -separated list of browsers to try ahead of the platformdefaults. When the value of a list part contains the string %s , then it isinterpreted as a literal browser command line to be used with the argument URLsubstituted for %s ; if the part does not contain %s , it is simplyinterpreted 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 a 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:
Python 3.5 Free Download
The following exception is defined:
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |