1

I want to close the browser and to continue the code.

def run():
    @eel.expose
    def end_browser():
        print("YES2")
        eel.end()
        eel.close()
        os._exit(0) 

    eel.init('web')
    eel.start("test.html", size=(700,700))
    

run()

print("Continue")

I was advised to use the subprocess.

import subprocess

process = subprocess.run([???], capture_output=True, shell=True)
print(process.returncode) # return 2 if was error

print("Continue code")

But I did not quite understand what you need to write in brackets to start the function.
How can I close part of the code that it continued on?

sortfact
  • 21
  • 3

0 Answers0