How to get output of command called by os.system()?

Chris Rebert clp2 at
Sat Oct 31 07:16:42 CET 2009

On Fri, Oct 30, 2009 at 11:09 PM, Peng Yu <pengyu.ut at> wrote:
> I need to integrate shell program with python. I'm wondering if there
> is a way get the output of the shell program called by os.system().

You'd probably do better to use the `subprocess` module instead:


More information about the Python-list mailing list