def _testmain():
s = PeriodicSource("hello", 1, name="src")
d1 = Drain(name="d1")
c = ConsoleSink(name="c")
tf = TransformDrain(lambda x:"Got %r" % x)
t = TermSink(name="t", keepterm=False)
s > d1 > c
d1 > tf > t
p = PipeEngine(s)
p.graph(type="png",target="> /tmp/pipe.png")
p.start()
print p.threadid
time.sleep(5)
p.stop()
评论列表
文章目录