Checking for duplicate instances of a script...

Josiah Carlson jcarlson at uci.edu
Thu Jan 22 11:43:33 EST 2004


> >Hello, python beginner here,
> >How can I make sure that a given script is never run more than once at the
> >same time in a system ?
> >Besides checking 'ps' for its own name. Most modern langages have a direct
> >way to do that.
> >Thanks
> What modern language has a direct way to do that?

You can register a COM or CORBA interface (is this what they are called?)
and attempt to connect to it during startup.  If you can connect to
yourself, don't start up, if you can't, start up.

 - Josiah




More information about the Python-list mailing list