on-internet
← Community

how can I disable multiple instances of a python script?

Stack Overflow ·

I made a python program and I want to disable the option to launch it multiple times in parallel. I searched the web and found that I need to do it with socket and ports, but I didn't find any example of how to do it(I know the steps, but I need to search every step on google and I am not so sure how to start). I also found that there might be libraries that can do that but to specific operating systems. My script only targets Windows 10, so I need to find a library that does that to Windows if there is one. Do you know such libraries or can you give a more detailed example of how to make this

Comments

Sign in or sign up to comment and upvote.

No comments yet.