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
from __future__ import print_function | |
import os, sys, pipes | |
import objc | |
from Foundation import NSObject | |
from CoreFoundation import ( | |
CFRunLoopRun, CFRunLoopStop, CFFileDescriptorCreate, | |
CFFileDescriptorCreateRunLoopSource, CFRunLoopAddSource, |
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
from zmq.eventloop import ioloop | |
ioloop.install() | |
from tornado.httpclient import AsyncHTTPClient | |
from tornado import gen | |
def handle_request(response): | |
if response.error: | |
print "Error:", response.error | |
else: |