[ create a new paste ] login | about

Project: circuits
Link: http://circuits.codepad.org/I9LehjEZ    [ raw code | output | fork ]

Python, pasted on Jul 22:
#!/usr/bin/env python

from circuits import Debugger, Component, Event
from circuits.web import Controller, Server
		
class Foo(Event): pass

class Far(Component):

	channel = "foo"
	def foo(self):
		return "bar"


class Index(Controller):

	def foo(self):
		return "bar"

	def index(self):
		yield self.call(Foo(), "foo")
		
i = Index()
(Server(8081) + i + Debugger() + Far()).run()


Output:
1
2
3
4
Traceback (most recent call last):
  Line 3, in <module>
    from circuits import Debugger, Component, Event
ImportError: No module named circuits


Create a new paste based on this one


Comments: