示例#1
0
    def process_start(self):
        self.display = guild.lookup("display")
        self.surface = self.display.get_surface( self.size )

        self.r, self.dr = 128, random.choice([-3,-2,-1,1,2,3])
        self.g, self.dg = 128, random.choice([-3,-2,-1,1,2,3])
        self.b, self.db = 128, random.choice([-3,-2,-1,1,2,3])
示例#2
0
 def process_start(self):
     tries = 0
     while True:
         splitter = guild.lookup(self.name)
         if splitter is None:
             tries += 1
             time.sleep(0.01)
             if tries > 100:
                 raise Exception("BUST")
         else:
             break
     splitter.subscribe(self.input)
示例#3
0
 def process_start(self):
     tries = 0
     while True:
         splitter = guild.lookup(self.name)
         if splitter is None:
             tries += 1
             time.sleep(0.01)
             if tries > 100:
                 raise Exception("BUST")
         else:
             break
     splitter.subscribe(self.input)
示例#4
0
def PublishTo(name):
    splitter = guild.lookup(name)
    return splitter
示例#5
0
文件: __main__.py 项目: bbcrd/guild
#!/usr/bin/python

from __future__ import print_function

print("Guild Self Test")

print("  ... test service registry")
import guild
guild.init()
guild.register("hello", 5)
x = guild.lookup("hello")
assert x == 5
print("Self test successful")
示例#6
0
def PublishTo(name):
    splitter = guild.lookup(name)
    return splitter
示例#7
0
#!/usr/bin/python

from __future__ import print_function

print("Guild Self Test")

print("  ... test service registry")
import guild

guild.init()
guild.register("hello", 5)
x = guild.lookup("hello")
assert x == 5
print("Self test successful")