Single Application Instance Example

Tim Golden tim.golden at viacom-outdoor.co.uk
Tue Jun 14 09:54:11 EDT 2005


[Chris Lambacher]
| Does anyone know of an example of how to make a Python program only
| run a single instance.  I am specifically looking for examples for
| win32.
| 
| I think I should be able to do this with win32all but the method is
| not obvious.  Preferably I would like to be able to get a handle to
| the already running instance so that I can push it to the foreground
| as well.

You could Google around through the archives of this group and
find some previous discussions, for greater detail, but the
standard approach (within the Python world and without) seems 
to be to use the Mutexes exposed by the win32event module.

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list