title: Can Perspective Broker be used over stdio instead of TCP?
body: <p>I'm using Twisted's Perspective Broker for RMI between a process and subprocess.</p>
  
  <p>Rather than listen on a TCP socket (such as by passing <code>reactor.listenTCP()</code> an instance of <code>PBServerFactory</code>) and have the subprocess connect to it, I'd prefer to use the subprocess's stdin and stdout.</p>
  
  <p>I've found <code>twisted.internet.stdio.StandardIO</code>, but if that's the way to go, I'm not sure how to set everything up.</p>
  
  <p>Is it feasible to use PB over stdio instead of TCP? How?</p>
  
  <hr>
  
  <h2>Wait, why?</h2>
  
  <p>The subprocess is for running untrusted code. It's sandboxed, but needs to be able to communicate back with the parent process in limited ways. Some form of RMI is by far the cleanest option for the specific use case, and PB has an access model that looks right. But the sandboxed process doesn't have -- and shouldn't need -- network access. That RMI is its only communication with the outside world, and piping it through stdin/stdout seems like a clean way of doing business.</p>
  
  <p>But if I'm not going about this the right way, that's a perfectly valid answer too.</p>