Created
February 5, 2017 20:05
-
-
Save markrwilliams/c0ad217040fa5a2053715bf885909e64 to your computer and use it in GitHub Desktop.
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 sys | |
import treq | |
from twisted.internet.task import react | |
def main(reactor, domain): | |
d = treq.head(domain) | |
d.addErrback(print, "invoked print") | |
return d | |
react(main, sys.argv[1:]) | |
# compare: | |
# python synchronous.py 'https://blahblah' | |
# python synchronous.py 'https://*' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment