[Twisted-Python] calling unix commands

Bob Ippolito bob at redivi.com
Fri Sep 12 22:20:02 EDT 2003

On Saturday, Sep 6, 2003, at 13:07 America/New_York, Konrad Rokicki 

> Hey everyone,
> I'm having a problem calling a unix comand from inside a twisted 
> program..
> I do
> 	os.popen(cmd).readlines()
> and I sporadically get:
> 	IOError: [Errno 4] Interrupted system call
> Sounds like it might be an async problem.. is there a preferred way to 
> do
> this in twisted?

use twisted.internet.process

or the convenience function:
twisted.internet.getProcessOutput(executable, args=(), env={}, 
path='.', reactor=reactor):

see: http://www.twistedmatrix.com/documents/howto/process


More information about the Twisted-Python mailing list