
Andreas Jung wrote:
--On 10. Februar 2006 06:50:28 +0100 robert rottermann <robert@redcor.ch> wrote:
Salu zäme, ich möchte einen in python geschriebenen startscript aus python starten. dazu benutze ich folgende zeilen:
*def* startstopZopeInstance(path, command, quiet = 0): p = popen('%s/bin/zopectl %s' % (path, command)) result = p.close() *if* *not* quiet: *print* result *print* 'Zope started/stoped'
wobei command jeweils 'start' ist.
So einfach geht das wirklich nicht. Der übliche Weg geht über das (Doppel)-Forken eines neuen Prozesses und Überlagerung des neuen Prozesses via execXX(). Dabei muß man natürlich auch auf die Ein- und Ausgabekanäle achten. Als Zoper solltest Du Dir mal das zdaemon Paket anschauen.
-aj
danke für die antwort, ich hatte gehoft, es genüge wenn der controllerscript die "doppelgabel" schon auf dem tisch (sprich ausgeführt) hat. wenn ich den init script von cron aus aufrufe, muss ich mich da ja auch nicht drum kümmern. robert _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de