[Python-checkins] r50902 - python/trunk/Doc/lib/libwebbrowser.tex

andrew.kuchling python-checkins at python.org
Fri Jul 28 14:32:44 CEST 2006


Author: andrew.kuchling
Date: Fri Jul 28 14:32:43 2006
New Revision: 50902

Modified:
   python/trunk/Doc/lib/libwebbrowser.tex
Log:
Add example

Modified: python/trunk/Doc/lib/libwebbrowser.tex
==============================================================================
--- python/trunk/Doc/lib/libwebbrowser.tex	(original)
+++ python/trunk/Doc/lib/libwebbrowser.tex	Fri Jul 28 14:32:43 2006
@@ -136,6 +136,18 @@
 Only on MacOS X platform.
 \end{description}
 
+Here are some simple examples:
+
+\begin{verbatim}
+url = 'http://www.python.org'
+
+# Open URL in a new tab, if a browser window is already open. 
+webbrowser.open_new_tab(url + '/doc')
+
+# Open URL in new window, raising the window if possible.
+webbrowser.open_new(url)
+\end{verbatim}
+
 
 \subsection{Browser Controller Objects \label{browser-controllers}}
 


More information about the Python-checkins mailing list