# now what? The below is a wrong way to create protocol. <br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>    # But how do I do this?</div>
<div>    proto = factory.buildProtocol((&#39;foo&#39;,))</div>
<div>    reactor.spawnProcess(proto, exe, args)</div></div></div></blockquote><div><br></div><div>spawnProcess takes a ProcessProtocol, which has a different interface than regular Protocols. You&#39;ll need to make a ProcessProtocol that hands over data to the PB protocol instance. The process documentation covers the API: <a href="http://twistedmatrix.com/documents/current/core/howto/process.html">http://twistedmatrix.com/documents/current/core/howto/process.html</a> </div>
</div>