/docs/source/tutorial/004.py

https://bitbucket.org/prologic/circuits/ · Python · 15 lines · 8 code · 6 blank · 1 comment · 0 complexity · 092ffeefa288302927abfddd5eb6ed6e MD5 · raw file

  1. #!/usr/bin/env python
  2. from circuits import Component
  3. class Bob(Component):
  4. def started(self, *args):
  5. print("Hello I'm Bob!")
  6. class Fred(Component):
  7. def started(self, *args):
  8. print("Hello I'm Fred!")
  9. (Bob() + Fred()).run()