How do I force a single instance of a python app?
Jeff Kunce
kuncej at mail.conservation.state.mo.us
Thu Oct 26 17:44:11 EDT 2000
> >The second instance of open("foo","w") does not fail.
> I can even open for append from two different instances of the same
> program and get interleaved output.
Yup. It can create some very interesting data files - I had to untangle one
once :-(
You can control that problem by using msvcrt.locking(), which
provides file locking facilities for windows.
--Jeff
More information about the Python-list
mailing list