Steve already answeared to your question, regaring PHP script

if this would be python script, you could run it by import'ing it

#a.py
print "in a"
------------

#b.py
import a        # prints "in a"
print "in b"
------------

and of course other solutions
import os
if os.fork()==0:
    os.execv("/bin/cmd_here", ["-blabla"])
else:
    # parent here

or maybe using threading

 >>> class FileWatcher(th.Thread):
...     def __init__(self, filename):
...             th.Thread.__init__(self)
...             self.filename = filename
...     def run(self):
...             import time
...             from os.path import exists
...             while not exists(self.filename):
...                     time.sleep(0.5)
...                     print "not there"
...
 >>> f = FileWatcher("/pool/xyz")
 >>> f.start()
 >>> not there
not there
not there
not there
not there
not there
not there
not there
not there
not there
not there
not there

 >>>


hth, Daniel

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to