~justin-fathomdb/nova/justinsb-openstack-api-volumes

« back to all changes in this revision

Viewing changes to vendor/Twisted-10.0.0/doc/web/examples/dlpage.py

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from twisted.internet import reactor
 
2
from twisted.web.client import downloadPage
 
3
from twisted.python.util import println
 
4
import sys
 
5
 
 
6
downloadPage(sys.argv[1], "foo").addCallbacks(
 
7
   lambda value:reactor.stop(),
 
8
   lambda error:(println("an error occurred",error),reactor.stop()))
 
9
reactor.run()