Closed Gowixx closed 1 year ago
Sorry for leaving this unresponded for a very long while. You've probably already solved this but for future reference here is the full code pretty much.
import webview
import eel
import threading
def start_app():
eel_thread = threading.Thread(target=eel_start) # Eel app start.
eel_thread.setDaemon(True)
eel_thread.start() # Run eel in a seperate thread.
webview_start() # Start pywebview web browser.
def eel_start():
# EEL app start.
eel.start("web/index.html", port=8000, mode=None, shutdown_delay=0.0)
def webview_start():
# pywebview start.
webview.create_window("App Name", "http://localhost:8000/web/index.html")
webview.start()
start_app() # Run app.
I don't think this is possible with eel or chrome(the browser eel defaults to) but I think this can be done if you use pywebview as the browser instead. pywebview is a really good and up-to-date python browser module. I've used it with EEL before.
Here's a piece of code to get it up and running.