Python script and yum

Hello to everyone:)

This probably is a simple question here(hopefully), but i am trying to learn python, and after much googling cannot find an answer.

How can i get yum command to work in the example below

Hopefully this is in the right section, if not i apologise

Dave

Try this.

Thanks for your reply, it does what it says, but i would like to be able to call all different yum commands
in functions etc, i did manage to do this by adding about four extra lines at the beginning of the script, but sadly i lost my notes.
Sorry for not explaining this very well.

Dave