Refer to this simple example:
If I call
fig.show() multiple times, plotly seems to know which port to use depending on the ports already in use.
Can I be pointed out to the code segment that checks which ports are already in use and how it determines which one to write on? Any other reference would also be appreciated.
This knowledge is useful to launch plotly app in a multi-user machine, where users can be using the app simultaneously and only one user can write to port 8050 at a time.
Hi all, can I get a response on this?
I know where the repository is but thanks. I was hoping to get direction towards a “code segment”, not the whole repository. However, I did some digging on my own and found the following lines:
While I am not yet sure if I shall find my answers in the lines but putting them here anyway in case you have anything to say about them.
According to the source code you sent, they use this class: http.server — HTTP servers — Python 3.11.4 documentation so the port number is specified as 0 i.e. it is dynamically allocated.