How to start python Eel in any available browser of user system?

Question:

I am trying to create a windows based application using eel. I want it to start in any available browser in the system of the user. How can I do it ? ( consider that user have not installed chrome in his system )

Answers:

You can pass in mode='default' to the eel.start function, and it will try to open the system’s default browser. Something like this:

eel.start('index.html', mode='default')

In this case, behind-the-scenes Eel will be proxying the open request to Python’s webbrowser.open function, so it’s best to check there if you want to know the logic being used. Or you can look at the Python source file for webbrowser.py on your machine… on Windows it would be located somewhere like: C:Python39Libwebbrowser.py.

Answered By: dstricks

Maybe it’s too late for you, I had the same problem. So to resolve it you have open your folder with code source of eel and open init.py and change browser option.

Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.