]> granicus.if.org Git - python/commitdiff
Add example
authorAndrew M. Kuchling <amk@amk.ca>
Fri, 28 Jul 2006 12:32:43 +0000 (12:32 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Fri, 28 Jul 2006 12:32:43 +0000 (12:32 +0000)
Doc/lib/libwebbrowser.tex

index e86b578ce07aadd0aa2142b3a4deb9b8ddb91c0e..11d77a12404a1d186c8ea65c5a9f5fa0ce216183 100644 (file)
@@ -136,6 +136,18 @@ Library Modules} manual.
 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}}