A unique instance of Python GUI program

Larry Bates larry.bates at vitalEsafe.com
Tue Sep 16 09:36:12 EDT 2008


akineko wrote:
> Hello everyone,
> 
> This may not be a Python specific challenge.
> I have a GUI program written in Python + Tkinter.
> It works very well.
> 
> Now, I would like to start it from a shell script.
> As my GUI program includes a server, it should not have more than one
> instance.
> Is there any easy way to check if another instance of the program is
> already running.
> 
> I vaguely remember that Windows programming provides a way to check.
> 
> A platform independent approach would be nice but a solution for X is
> sufficient for my application.
> 
> Any comments will be greatly appreciated.
> 
> Best regards,
> Aki Niimura

Here is a recipe:

http://code.activestate.com/recipes/474070/

-Larry



More information about the Python-list mailing list