Skip to content

Instantly share code, notes, and snippets.

@markrwilliams
Created February 5, 2017 20:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markrwilliams/c0ad217040fa5a2053715bf885909e64 to your computer and use it in GitHub Desktop.
Save markrwilliams/c0ad217040fa5a2053715bf885909e64 to your computer and use it in GitHub Desktop.
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