1

During dev it's a pain to close all the eel windows when you need to restart eel for python code changes.

For development purposes, and since we don't yet have live-reload for python using eel, it would be helpful to close all the windows when the python program is quit.

I have the limitation that I am unable to call js from python in case that is part of your solution.

I thought of using a ping to eel and closing each window using this little script, but eel doesn't seem to throw the error while the function is being called.

setInterval(pingEel, 250);

function pingEel(a, b) {
  try {
    eel.ping_eel();
  } catch (error) {
    console.log("Ping to eel failed, python must be closed.  Closing windows.")
    window.close()
  }
}
BAR
  • 15,909
  • 27
  • 97
  • 185

0 Answers0