Can someone point me to some good docs on Ampoule deferToAMPProcess?<div>I am trying in vain to get the simplest possible example working, with no success.</div><div><br></div><div><div>from ampoule import deferToAMPProcess, util</div>
<div>from twisted.internet import reactor, defer</div><div><br></div><div>def test():</div><div> return "TEST"</div><div><br></div><div>@util.mainpoint</div><div>def main(args):</div><div> </div><div> @defer.inlineCallbacks</div>
<div> def _run():</div><div> val = yield deferToAMPProcess(test)</div><div> print val</div><div> reactor.stop()</div><div> </div><div> reactor.callLater(1, _run)</div><div> reactor.run()</div>
</div><div><br></div><div>Gives:</div><div><br></div><div>exceptions.AttributeError: 'str' object has no attribute '_doCommand'</div><div><br></div><div>I've tried different combinations, returnd Deferreds from the test() function, inline callbacks with defer.returnValue().</div>
<div>Can't get it to work.</div><div><br></div><div>Looks like I am not the only one:</div><div><br></div><div><a href="https://answers.launchpad.net/ampoule/+question/75143">https://answers.launchpad.net/ampoule/+question/75143</a></div>
<div><br></div><div>Thanks in advance</div><div>Jacek</div>