Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬Register for the Oct 27 webinar.

How does plotly know of ports in use?

Refer to this simple example:
https://plotly.com/python/line-and-scatter/#scatter-plot-with-plotly-express

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?

The open source repository for plotly.py is here: https://github.com/plotly/plotly.py/

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.