Re: Daemonizing python

2006-09-25 Thread andychambers2002
Andi Clemens wrote: > Hi, > > what is the main difference of running a python program as a daemon or > as a cronjob? > > I have written a program at work that checks all internet connections of > our failover sites and saves the results in a MySQL-database. > The whole program is made with django

Re: Daemonizing python

2006-09-25 Thread Diez B. Roggisch
Paul Rubin wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: >> There is a good daemonization recipe on activstate: >> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012 > > That is worth reading, including the long comment thread. Yeah, it is somewhat disappointing that the ver

Re: Daemonizing python

2006-09-24 Thread Andi Clemens
Hi, what is the main difference of running a python program as a daemon or as a cronjob? I have written a program at work that checks all internet connections of our failover sites and saves the results in a MySQL-database. The whole program is made with django (a webframework) so I had to be

Re: Daemonizing python

2006-09-24 Thread Paul Rubin
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > There is a good daemonization recipe on activstate: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012 That is worth reading, including the long comment thread. -- http://mail.python.org/mailman/listinfo/python-list

Re: Daemonizing python

2006-09-24 Thread Diez B. Roggisch
NinjaZombie schrieb: > Hi! > > I was wondering if it is possible to turn the current python proccess into > a unix daemon, but not doing it like this: > python myscript.py & > but from code programaticaly. There is a good daemonization recipe on activstate: http://aspn.activestate.com/ASPN/Coo

Re: Daemonizing python

2006-09-24 Thread NinjaZombie
Na dan Sun, 24 Sep 2006 14:35:31 -0700, Paul Rubin je napisao: > Try it this way: > > import os, sys > print "Entering program" > > if os.fork(): > sys.exit() # parent process exits so shell returns > > while (1): # child process continues

Re: Daemonizing python

2006-09-24 Thread Paul Rubin
NinjaZombie <[EMAIL PROTECTED]> writes: > Thanks guys, but I'm a little new to this. Take a look at this very simple > code: > > import os > print "Entering program" > os.fork() > while (1): > pass# some other work Try it this way: import os, sys print "Entering program"

Re: Daemonizing python

2006-09-24 Thread NinjaZombie
Na dan Sun, 24 Sep 2006 23:19:12 +0200, Bjoern Schliessmann je napisao: > Paul Rubin wrote: >> NinjaZombie <[EMAIL PROTECTED]> writes: > >>> I was wondering if it is possible to turn the current python >>> proccess into a unix daemon, but not doing it like this: >>> python myscript.py & >>> but f

Re: Daemonizing python

2006-09-24 Thread Bjoern Schliessmann
Paul Rubin wrote: > NinjaZombie <[EMAIL PROTECTED]> writes: >> I was wondering if it is possible to turn the current python >> proccess into a unix daemon, but not doing it like this: >> python myscript.py & >> but from code programaticaly. > Yeah, os.fork and the parent process exits. Or littl

Re: Daemonizing python

2006-09-24 Thread Paul Rubin
NinjaZombie <[EMAIL PROTECTED]> writes: > I was wondering if it is possible to turn the current python proccess into > a unix daemon, but not doing it like this: > python myscript.py & > but from code programaticaly. Yeah, os.fork and the parent process exits. -- http://mail.python.org/mailman/

Daemonizing python

2006-09-24 Thread NinjaZombie
Hi! I was wondering if it is possible to turn the current python proccess into a unix daemon, but not doing it like this: python myscript.py & but from code programaticaly. Thanks. -- http://mail.python.org/mailman/listinfo/python-list