Y
Y
yuki2021-02-14 10:53:09
Flask
yuki, 2021-02-14 10:53:09

Run code after flask app.run?

I have code

webbrowser.open_new_tab("http://localhost:5000/")
app.run()

How to make it so that the server starts first, and then the browser opens? (for geniuses: rearranging lines of code will not help)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2021-02-14
@bacon

For "genius", ok google "flask run code after app.run"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question