Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # webbrowser_newtabs.py
- import webbrowser
- new = 2 # open in a new tab, if possible
- # open a public URL, in this case, the webbrowser docs
- url = "http://docs.python.org/library/webbrowser.html"
- webbrowser.open(url,new=new)
- # open an HTML file on my own (Windows) computer
- url = "file://C:/Users/test/Sample_HTML.html" # Note: foward slashes
- webbrowser.open(url,new=new)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement