1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from twisted.internet import reactor from web_date_12 import fetchDate def main(): d = fetchDate('google.com') def cbGoogle(date): print 'Google date is', date d = fetchDate('yahoo.com') def cbYahoo(date): print 'Yahoo date is', date d.addCallback(cbYahoo) d.addCallback(cbGoogle) reactor.run() main() |