avoid script running twice

Robin Becker robin at reportlab.com
Mon Jun 18 19:19:18 CEST 2007

Evan Klitzke wrote:

> Another method that you can use is to open up a socket on some
> predetermined port (presumably above 1024), and then have your program
> try to connect to that port and "talk" to the other program to
> determine whether or not to run (or whether to do some of the
> remaining work, etc.).

that might work, but this runs on  someone's java solaris box with possible many 
connections going on. I doubt I'd be able to guarantee a particular port.
Robin Becker

More information about the Python-list mailing list