/docs/source/tutorial/005.py
https://bitbucket.org/prologic/circuits/ · Python · 27 lines · 16 code · 10 blank · 1 comment · 0 complexity · 901e75cf7dc886c0984e90e5624ff005 MD5 · raw file
- #!/usr/bin/env python
- from circuits import Component
- from circuits.tools import graph
- class Pound(Component):
- def __init__(self):
- super(Pound, self).__init__()
- self.bob = Bob().register(self)
- self.fred = Fred().register(self)
- def started(self, *args):
- print(graph(self.root))
- class Bob(Component):
- def started(self, *args):
- print("Hello I'm Bob!")
- class Fred(Component):
- def started(self, *args):
- print("Hello I'm Fred!")
- Pound().run()