[Twisted-web] Ampoule deferToAMPProcess confusion

Jacek Furmankiewicz jacek99 at gmail.com
Fri Oct 14 17:41:29 EDT 2011


Can someone point me to some good docs on Ampoule deferToAMPProcess?
I am trying in vain to get the simplest possible example working, with no
success.

from ampoule import deferToAMPProcess, util
from twisted.internet import reactor, defer

def test():
    return "TEST"

@util.mainpoint
def main(args):

    @defer.inlineCallbacks
    def _run():
        val = yield deferToAMPProcess(test)
        print val
        reactor.stop()

    reactor.callLater(1, _run)
    reactor.run()

Gives:

exceptions.AttributeError: 'str' object has no attribute '_doCommand'

I've tried different combinations, returnd Deferreds from the test()
function, inline callbacks with defer.returnValue().
Can't get it to work.

Looks like I am not the only one:

https://answers.launchpad.net/ampoule/+question/75143

Thanks in advance
Jacek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20111014/eafe43cd/attachment.htm 


More information about the Twisted-web mailing list