예제 #1
0
 def hello( self, name, address ):
     new_channel = self.allocate_first_unused_channel( name, address )
     if new_channel is not None:
         n = token(new_channel)
         return ( [ n, 'name', name ], [n, 'vote', 0 ], [n, 'ip', address ], [n, 'port', 'connect', address, INSTRUMENT_PORT ] )
     else:
         pdgui.post( "Channel table is full, ignoring connection request from %s at %s." % (name, address) )
         return None
예제 #2
0
 def hello(self, name, address):
     new_channel = self.allocate_first_unused_channel(name, address)
     if new_channel is not None:
         n = token(new_channel)
         return ([n, 'name', name], [n, 'vote', 0], [n, 'ip', address],
                 [n, 'port', 'connect', address, INSTRUMENT_PORT])
     else:
         pdgui.post(
             "Channel table is full, ignoring connection request from %s at %s."
             % (name, address))
         return None
예제 #3
0
 def goto(self, location ):
     pdgui.post( "Python DemoClass object received goto message:" + location)
     return location
예제 #4
0
 def symbol(self, string ):
     pdgui.post( "Python DemoClass object received symbol: '%s'." % string)
     return string
예제 #5
0
 def list(self, *args ):
     # note that the *args form provides a tuple
     pdgui.post( "Python DemoClass object received list: %s." % str(args))
     return list(args)
예제 #6
0
 def bang(self):
     pdgui.post( "Python DemoClass object received bang.")
     return True
예제 #7
0
 def float(self, number):
     pdgui.post( "Python DemoClass object received %f." % number)
     return number
예제 #8
0
 def tuple(self):
     pdgui.post( "Python DemoClass object received tuple message.")
     return ( ['element', 1], ['element', 2], ['element', 3],[ 'element',4 ] )
예제 #9
0
 def __init__(self, *creation):
     pdgui.post("Creating DemoClass object with creation args: %s." %
                str(creation))
     return
예제 #10
0
 def moveto(self, x, y, z):
     pdgui.post(
         "Python DemoClass object received move message with %f, %f, %f." %
         (x, y, z))
     return [x, y, z]
예제 #11
0
 def blah(self):
     pdgui.post("Python DemoClass object received blah message.")
     return 42.0
예제 #12
0
 def list(self, *args):
     # note that the *args form provides a tuple
     pdgui.post("Python DemoClass object received list: %s." % str(args))
     return list(args)
예제 #13
0
 def goto(self, location):
     pdgui.post("Python DemoClass object received goto message:" + location)
     return location
예제 #14
0
 def symbol(self, string):
     pdgui.post("Python DemoClass object received symbol: '%s'." % string)
     return string
예제 #15
0
 def float(self, number):
     pdgui.post("Python DemoClass object received %f." % number)
     return number
예제 #16
0
 def bang(self):
     pdgui.post("Python DemoClass object received bang.")
     return True
예제 #17
0
 def moveto( self, x, y, z ):
     pdgui.post( "Python DemoClass object received move message with %f, %f, %f." % ( x, y, z))
     return [x, y, z]
예제 #18
0
 def reload_demo_module(self):
     reload(dtw_distance)
     if (self.DEBUG) pdgui.post("done reloading")
     return
예제 #19
0
 def blah(self):
     pdgui.post( "Python DemoClass object received blah message.")
     return 42.0
예제 #20
0
 def __init__( self, *creation ):
     pdgui.post( "Creating DemoClass object with creation args: %s." % str(creation))
     return
예제 #21
0
 def tuple(self):
     pdgui.post("Python DemoClass object received tuple message.")
     return (['element', 1], ['element', 2], ['element', 3], ['element', 4])
예제 #22
0
 def __init__(self):
     if (self.DEBUG) pdgui.post("hello from reloader")
     pass