Daniel Schüle <uv**@rz.uni-karlsruhe.de> writes:
Steve already answeared to your question, regaring PHP script
if this would be python script, you could run it by import'ing it
That's not very pythonic. Better is to provide a function in the
script to run it (say run), then run that in the script iff it's
the script is being executed:
if __name__ == '__main__':
run()
Then to use it from another script, you'd do something like:
import myscript
myscript.run()
or maybe using threading
Launching new threads as part of the import process is
*dangerous*. There are some nasty bugs lurking there that cause things
like your import never finishing. If you need to start a thread in a
module, the approach outlined above avoids those bugs.
<mike
--
Mike Meyer <mw*@mired.org>
http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.