Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
created by github.com/tr3buchet/gister
(circuits)
prologic@daisy
Wed Oct 29 17:54:07
~/circuits
$ python
Python 2.7.8 (default, Sep 17 2014, 18:01:50)
[GCC 4.8.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from circuits import Manager, Debugger, Event
>>> m = Manager() + Debugger()
>>> m.start()
(<Thread(Manager, started daemon 139752131626752)>, None)
<registered[*] (<Debugger/* 3368:Manager (queued=0) [S]>, <Manager/ 3368:Manager (queued=2) [R]> )>
>>> <started[*] (<Manager/ 3368:Manager (queued=1) [R]> )>
>>> m.fire(Event.create("foo"))
<Value () result: False errors: False for <foo[*] ( )>
>>> <foo[*] ( )>
>>> m
<Manager/ 3368:MainThread (queued=0) [R]>
>>> from threading import enumerate
>>> list(enumerate())
[<_MainThread(MainThread, started 139752217548544)>, <Thread(Manager, started daemon 139752131626752)>]
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.