newbie question - executing system commands

Borzoj borzoj at pingu.ii.uj.edu.pl
Tue Sep 4 04:33:21 EDT 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
};done


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

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





More information about the Python-list mailing list