Commits

Matthew Turk committed 61399a3

Adding simple client functionality. This now uses Pyro4.

Comments (0)

Files changed (2)

+from yt.mods import *
+import Pyro4
+
+uri = raw_input("URI? ").strip()
+VRH = Pyro4.Proxy(uri)
+insert_ipython()
 from yt.mods import *
 from mpi4py import MPI
 import time
+import Pyro4
 
 def requires_pf(func):
     @wraps(func)
         msg = dict(type = func.func_name, args = argspec)
         self.send(msg)
         mylog.debug("Sending message: %s, %s", msg['type'], msg['args'])
-        func(*args, **kwargs)
+        return func(*args, **kwargs)
     return sender
 
 class LockstepProxy(object):
         if self.cam.transfer_function is None:
             raise RuntimeError
         sn = self.cam.snapshot()
+        print sn
         return sn
 
     @broadcasted_action
 if __name__ == "__main__":
     VRH = VolumeRenderingHandler()
     if MPI.COMM_WORLD.rank == 0:
-        #insert_ipython()
-        VRH.load("JHK-DD0030/galaxy0030")
-        print 1
-        snap = VRH.render()
-        print 2
-        snap = VRH.render()
-        print 3
-        snap = VRH.render()
-        print 4
-        snap = VRH.render()
-        print 5
-        snap = VRH.render()
-        time.sleep(10)
+        Pyro4.Daemon.serveSimple(
+            {VRH: "yt.volume_rendering_handler"},
+            ns=False)
     else:
         VRH.runwait()