--- Fabio Pliger <[EMAIL PROTECTED]> wrote:
> Yeah, but how can i retrieve my PID number?And how do i check if the
> process
> who has written the file is still alive?If there a way to have the
> list of
> the precesses running?
This subject has come up before. The thread starts here:
http://mai
"Aldric L'Hernault" <[EMAIL PROTECTED]> ha scritto nel
messaggio news:[EMAIL PROTECTED]
> Sidharth Kuruvila a écrit :
> > I haven't tested this. There is probably a better way of doing this
> > looking at process information. I use a lock file to mark that the
> > program is already running. The pr
Sidharth Kuruvila a écrit :
I haven't tested this. There is probably a better way of doing this
looking at process information. I use a lock file to mark that the
program is already running. The problem is that for an abrupt shutdown
the file might not be removed.
To enhance your check, just write
I haven't tested this. There is probably a better way of doing this
looking at process information. I use a lock file to mark that the
program is already running. The problem is that for an abrupt shutdown
the file might not be removed.
import atexit
if os.path.exists(lockfile):
print "there is