Created
October 29, 2014 07:53
-
-
Save prologic/a95ee4367d709e02b3e4 to your computer and use it in GitHub Desktop.
created by github.com/tr3buchet/gister
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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