[Python] Python webbrowser not opening in pop-up window

Discussão em 'Python' iniciado por Stack, Dezembro 28, 2024.

  1. Stack

    Stack Membro Participativo

    I am using Raspberry Pi 4 to run webbrowser.open(). But instead of open pop-up window, it show this in terminal. After choosing 'A', it shows the webpage content in terminal. How can I solve? I have set default browser to Firefox. I am not sure is it Raspberry Pi or Linux problem.

    Edit:

    My goal is to open an url in browser to get oauth2 and then auto close the pop-up window.

    Now I change to os.system("open <url>"). It opens in pop-window but I cannot auto close it by pyautogui.hotkey('ctrl', 'w'). (pyautogui works when the window is opened by webbrowser.open())

    [​IMG]

    [​IMG]

    Continue reading...

Compartilhe esta Página