This file contains hidden or 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
| import os | |
| import fcntl | |
| from gevent.core import wait_read, wait_write | |
| class GeventFD(object): | |
| """ Wrap a file descriptor so it can be used for non-blocking reads and writes with gevent. | |
| >>> stdin = GeventFD(sys.stdin.fileno()) | |
| >>> stdin.read(5) | |
| 'hello' |
This file contains hidden or 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
| #!/usr/bin/env python | |
| __author__ = 'Frank Smit <[email protected]>' | |
| __version__ = '0.1.0' | |
| import functools | |
| import psycopg2 | |
| from tornado.ioloop import IOLoop, PeriodicCallback |
NewerOlder