running a shell command from a python program

Leif B. Kristensen abuse at solumslekt.org
Wed Feb 23 10:35:50 EST 2005


Sandman wrote:

> How would I run a shell command in Python?
> 
> Here is what I want to do:
> I want to run a shell command that outputs some stuff, save it into a
> list and do stuff with the contents of that list.

There's a Python Cookbook example that should fit nicely with what
you're trying to do here:

<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52296>
-- 
Leif Biberg Kristensen



More information about the Python-list mailing list