I want to check if a browser opened with Selenium is still open. I would need this check for closing a program. If the browser is not open, then the GUI should be destroyed without a message (tk.messagebox) coming. But if the browser is open, then the message should come as soon as the function is activated. Here is the
Tag: exit
Python cancel process using ctrl + c without quitting program?
I want to be able to quit a action my program is preforming by hitting ctrl + c, but without quitting the program entirely. I’m sure there is a thread about this somewhere, but I couldn’t find anything related to what I want. Here is what I want . Answer You can wrap your function in a try except block