[Python] Python Webbrowser not opening new window

Discussão em 'Python' iniciado por Stack, Fevereiro 10, 2025.

  1. Stack

    Stack Membro Participativo

    From what I am reading Python webbrowser documentation you can either use Open() with a new=1 argument or using open_new() should open a new window. Not another tab.

    I was working on a bigger project where I needed this functionality. Thought it was something else in the code and slimmed it down to this:

    import webbrowser
    webbrowser.open("https://stackoverflow.com", new=1, autoraise=True)
    webbrowser.open_new("https://stackoverflow.com")


    Even with just these 3 lines of code, the problem persist, both of the different functions should open it in a new window. But non of them does it.

    Does anyone know why it opens it in a tab rather than a new window?

    Continue reading...

Compartilhe esta Página