1
from twisted.internet import reactor
2
from twisted.web.client import getPage
3
from twisted.python.util import println
6
getPage(sys.argv[1]).addCallbacks(
7
callback=lambda value:(println(value),reactor.stop()),
8
errback=lambda error:(println("an error occurred", error),reactor.stop()))