#!/usr/bin/python # arg1 is the nodename import sys from subprocess import call rockscmd = '/opt/rocks/bin/rocks' nodename = sys.argv[1] cmd = [ rockscmd, 'remove', 'host', nodename ] call(cmd)