-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
What is the problem or limitation you are having?
The live_serve_en script builds the docs and starts a live server.
As nice a user affordance addition, it could also start a web browser.
Describe the solution you'd like
When starting a live server, a call to webbrowser.open() could be used to the user's default web browser on the root URL of the live server.
Describe alternatives you've considered
Do nothing. Clicking on the URL link in the console isn't that hard...
Additional context
It might be necessary to start a thread and launch the web browser from that thread. The live server will be a blocking process, so it won't be possible to start the web browser "after" running the server.
It may also be necessary to introduce a pause in the thread before launching the browser - the server won't be available immediately, so the thread may need to poll until the server will accept a connection on port 8000 (i.e., programmatically do a HEAD request on the URL, catching the errors until it succeeds), and only then launch the browser.