[Tutor] how to know if process is running?

Mac Ryan quasipedia at gmail.com
Tue Jul 28 19:11:12 CEST 2009

I am not an expert, but if I got you correctly, what you want to achieve
is a "singleton": http://en.wikipedia.org/wiki/Singleton_pattern if you
watch at the sample implementation, there is a Python example too.


On Tue, 2009-07-28 at 10:45 -0500, shawn bright wrote:
> Hey all,
> I have an app that runs in a GUI written in pygtk. It spawns several
> threads, and runs all the time.
> It is mission critical that we can never have two instances of this
> running at once.
> So, my question is, how can i write something that will know if there
> is an instance of that something already running?
> I am doing this in python 2.5 on Ubuntu, if that matters ( which i
> suspect it does ).
> thanks,
> shawn
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list