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

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

python 2.7 - Lines in my code being skipped and I am not sure why -

python - multiprocessing pool with map -