I just found out about a really interesting use of Python, that Red Hat Emerging Technology is developing called func. This was in a recent article at Red Hat Magazine, who I happen to write for as well btw.

We will be covering some examples of func in our book. At a high level though, func allows you to administer machines with python and python scripts. Here are a few examples from their front page:


import func.overlord.client as fc
client = fc.Client("*.example.org;*.example.com")

# package controls!
client.yum.update()

# service controls!
client.service.start("acme-server")

# hardware info!
print client.hardware.info()

# etc ... etc ..

I really like this example too, of rebooting all machines running http:


 results = fc.Client("*").service.status("httpd")
         for (host, returns) in results.iteritems():
         if returns == 0:
         fc.Client(host).reboot.reboot()

It is great to see Python use exploding at Red Hat. The cobbler/PXE boot project is also quite cool.