from twisted.internet.defer import Deferred as D

def start_app(_):
    return os.startfile('sasa')

def command_die(err):
    err.printTraceback()
d = D()
d.addCallback(start_app)
d.addErrback(command_die)
d.callback(0)
Twisted, Deferred full traceback