Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 09408f3c1571cbb746da49a1d2f22702 > files > 2955

python-twisted-17.5.0-1.mga6.x86_64.rpm

from __future__ import print_function

from twisted.internet import reactor


def gotIP(ip):
    print("IP of 'localhost' is", ip)
    reactor.stop()

reactor.resolve('localhost').addCallback(gotIP)
reactor.run()