Re: Python: debugging system calls

Date : Tue, 8 Aug 2006 11:56:11 -0400
To : XSI(at)Softimage.COM
From : "Bernard Lebel" <3dbernard(at)gmail.com>
Subject : Re: Python: debugging system calls
You might want to look into os.popen() and its various flavors, Brad.
This is how I intercept the XSIBATCH output in the Python program that
runs on the render farm.

Create the pipe object using
oPipe = os.popen( command name, 'r' )
Then read the output using
oPipe.read()


Cheers Bernard



On 8/8/06, Bradley Gabe <withanar(at)stanwinston.com> wrote:
I'm wondering if this is possible... I need to run os.system() calls
through python, and I need to be able to see the line Python echos as a
result.

So for example, if I want to run the command: whoami, I need to get the
string value that is echoed. The os.system() method itself just returns
a number describing the status of the command.

The purpose of this is to help in debugging Apache running mod python,
which is doing strange things regarding permissions.

Any help or advice appreciated!

-Brad

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.