[Python-checkins] CVS: python/dist/src/Doc/lib libwebbrowser.tex,1.4,1.5
Eric S. Raymond
esr@users.sourceforge.net
Tue, 23 Jan 2001 05:16:35 -0800
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv3470/Doc/lib
Modified Files:
libwebbrowser.tex
Log Message:
Rewrite webbrowser.py to fix various bugs following Ka-Ping Yee's
complaints. The new version moves most of its initialization to
package load time; it's simpler, faster, smaller, and adds support for
Mozilla and Links. Interpretation of the BROWSER variable now works
and is documented. The open_new entry point and methods are marked
"deprecated; may be removed in 2.1".
Index: libwebbrowser.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwebbrowser.tex,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** libwebbrowser.tex 2000/10/23 15:41:13 1.4
--- libwebbrowser.tex 2001/01/23 13:16:32 1.5
***************
*** 16,19 ****
--- 16,28 ----
process will block until the user exits the browser.
+ Under \UNIX, if the environment variable \envvar{BROWSER} exists, it
+ is interpreted to override the platform default browser, as a
+ colon-separated list of browsers to try in order. When the value of
+ a list part contains the string \code{\%s}, then it is interpreted as
+ a literal browser command line to be used with the argument URL
+ substituted for the \code{\%s}; if the part does not contain,
+ \code{\%s}, it is simply interpreted as the name of the browser to
+ launch.
+
For non-\UNIX{} platforms, or when X11 browsers are available on
\UNIX, the controlling process will not wait for the user to finish
***************
*** 36,44 ****
\begin{funcdesc}{open_new}{url}
Open \var{url} in a new window of the default browser, if possible,
! otherwise, open \var{url} in the only browser window.
\end{funcdesc}
\begin{funcdesc}{get}{\optional{name}}
! Return a controller object for the browser type \var{name}.
\end{funcdesc}
--- 45,56 ----
\begin{funcdesc}{open_new}{url}
Open \var{url} in a new window of the default browser, if possible,
! otherwise, open \var{url} in the only browser window. (This entry
! point is deprecated and may be removed in 2.1.)
\end{funcdesc}
\begin{funcdesc}{get}{\optional{name}}
! Return a controller object for the browser type \var{name}. If
! \var{name} is empty, return a controller for a default browser
! appriopriate
\end{funcdesc}
***************
*** 50,53 ****
--- 62,69 ----
create an instance when needed. If \var{instance} is provided,
\var{constructor} will never be called, and may be \code{None}.
+
+ This entry point is only useful if you plan to either set the
+ \envvar{BROWSER} variable or call \function{get} with a nonempty
+ argument matching the name of a handler you declare.
\end{funcdesc}
***************
*** 57,66 ****
\begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes}
\lineiii{'netscape'}{\class{Netscape}}{}
\lineiii{'kfm'}{\class{Konquerer}}{(1)}
\lineiii{'grail'}{\class{Grail}}{}
\lineiii{'windows-default'}{\class{WindowsDefault}}{(2)}
\lineiii{'internet-config'}{\class{InternetConfig}}{(3)}
- \lineiii{'command-line'}{\class{CommandLineBrowser}}{}
\end{tableiii}
--- 73,86 ----
\begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes}
+ \lineiii{'mozilla'}{\class{Mozilla}}{}
\lineiii{'netscape'}{\class{Netscape}}{}
+ \lineiii{'mosaic'}{\class{Mosaic}}{}
\lineiii{'kfm'}{\class{Konquerer}}{(1)}
\lineiii{'grail'}{\class{Grail}}{}
+ \lineiii{'links'}{\class{links}}{}
+ \lineiii{'lynx'}{\class{Lynx}}{}
+ \lineiii{'w3m'}{\class{w3m}}{}
\lineiii{'windows-default'}{\class{WindowsDefault}}{(2)}
\lineiii{'internet-config'}{\class{InternetConfig}}{(3)}
\end{tableiii}
***************
*** 99,102 ****
Open \var{url} in a new window of the browser handled by this
controller, if possible, otherwise, open \var{url} in the only
! browser window.
\end{funcdesc}
--- 119,123 ----
Open \var{url} in a new window of the browser handled by this
controller, if possible, otherwise, open \var{url} in the only
! browser window. (This method is deprecated and may be removed in
! 2.1.)
\end{funcdesc}