newbie question - executing system commands

Borzoj borzoj at
Tue Sep 4 10:33:21 CEST 2001

I'm newbie both in shell scripting and pyhon so please be kind :)
What would be the Python equivalent for following shell code:

for IMAGE_NAME in `ls`; do {
#processing of $IMAGE_NAME

...or in other words what is the easiest way to execute shell
command/external program from python and
get access to it's output?

This will be your new motto: dance like it hurts, love like you need money,
work when pepole are watching.

More information about the Python-list mailing list