Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > da3f2a4ce20b26cb5976aa965c74e071 > files > 2916

python2-twisted-19.2.0-1.mga7.armv7hl.rpm

from __future__ import print_function

from twisted.internet import utils, reactor

def printTrueValue(val):
    print("/bin/true exits with rc=%d" % val)
    output = utils.getProcessValue('/bin/false')
    output.addCallback(printFalseValue)

def printFalseValue(val):
    print("/bin/false exits with rc=%d" % val)
    reactor.stop()

output = utils.getProcessValue('/bin/true')
output.addCallback(printTrueValue)
reactor.run()