#!/usr/bin/env python

from icecc.control import SchedulerControl
import sys

if __name__ == '__main__':

    if len(sys.argv) < 3:
        print "Usage: icecc_value <host> [hosts|jobs|version]"
        sys.exit(-1)

    __ctrl__ = SchedulerControl(sys.argv[1])
    try:
        __ctrl__.run( " ", raw=True )
    except Exception, e:
        print e
	sys.exit(-1)

    print getattr(__ctrl__, sys.argv[2], "")
