19 __doc__ =
"""This script must be launched on the host where a calculation
20 is sought to be made; It forks a thread that runs the pyro handler.
24 nameserver's hostname (string, or None to broadcast for it)
25 uri of this instance's PyroHandler (string)
28 display X11 window (bool)
32 if __name__ ==
'__main__':
34 import os, sys, socket
35 from threading
import Thread
50 niceness = eval(sys.argv[1])
52 nshost = eval(sys.argv[2])
57 timeout = eval(sys.argv[4])
58 debug = eval(sys.argv[5])
59 display = eval(sys.argv[6])
60 temp_path = sys.argv[7]
62 os.environ[
'ISD_ROOT'] = temp_path
64 if not temp_path
in sys.path:
65 sys.path.insert(0, temp_path)
69 print 'PyroHandlerLoader: %s (%s)' % (uri, socket.gethostname())
72 handler_instance = PyroHandler(timeout, nshost, debug)
74 print 'PyroHandlerLoader: starting launch_instance in a thread'
77 t = Thread(target = launch_instance, \
78 args = (handler_instance, uri,
False, \
79 nshost, debug,
not display))
82 print 'PyroHandlerLoader: thread has been launched'