Search within running python scripts
Simon Forman
rogue_pedro at yahoo.com
Mon Jul 24 17:54:44 EDT 2006
More information about the Python-list mailing list
Mon Jul 24 17:54:44 EDT 2006
- Previous message (by thread): Search within running python scripts
- Next message (by thread): Search within running python scripts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
gmax2006 wrote: > Simon Forman wrote: > > gmax2006 wrote: > > > Hi, > > > > > > Is it possible that a python script finds out whether another instance > > > of it is currently running or not? > > > > > > Thank you, > > > Max > > > > Yes, there are several ways. What OS are you using? > > > > ~Simon > > I have to use an os-independent approach. > > At this point I use a file as running-flag. It doesn't work so good. > Because if the python application breaks or get terminated, it won't > run again unless somebody deletes the flag file. > > Alan Hmm, I'm very far from being an expert on this, so hopefully someone who knows better will reply. You might have to check the OS your script is running on and do, say, what faulkner proposed for linux (and Mac?), and something like http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/474070 for windows. HTH, ~Simon
- Previous message (by thread): Search within running python scripts
- Next message (by thread): Search within running python scripts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list