I need to find a right way to prevent two running instances of my (Python) program. I am currently using the following method.
On Windows,
os.popen(\
There are numerous ways:
What you need is a service (external to your application) that manages a namespace where unique ids are available & enforced.