creating single-instance executables using python/py2exe
Sybren Stuvel
sybrenUSE at YOURthirdtower.com.imagination
Fri Nov 11 08:42:51 EST 2005
Satchidanand Haridas enlightened us with:
> a new instance is created when I double click on two different
> files. Is there a way in which I can make sure only one instance is
> created?
You could open a listening socket to listen for "open file" commands.
If opening that socket fails (address already in use), connect a
client socket to it, send the appropriate "open file" command, and
exit.
That way, you even have a cross-platform solution.
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
More information about the Python-list
mailing list