Python: Change url of web browser using webbrowser-control -


ok, know if want open particular url using pyton run:

import webbrowser webbrowser.open("buinvent.com") 

but if want change different url in web browser without opening new window or new tab in web browser. there way that?

import webbrowser webbrowser.open('google.com', new = 0) 

and docs says:

if new 0, url opened in same browser window if possible. if new 1, new browser window opened if possible. if new 2, new browser page (“tab”) opened if possible

https://docs.python.org/3/library/webbrowser.html


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -