config/printconfigsetting.py
author Chris Jones <jones.chris.g@gmail.com>
Wed, 09 Mar 2011 11:27:37 -0600
changeset 63366 439f8db100d7d77257c5edbe3436e95e5e347002
parent 2752 bb06c19d18c043e1b2c66aeffb3b1e33205f7378
permissions -rw-r--r--
Bug 635035, part 1: Separate the extended draw region and computed draw region so that shadow-layer readback gets the same quadrant as what was drawn. r=mattwoodrow

import configobj, sys

try:
    (file, section, key) = sys.argv[1:]
except ValueError:
    print "Usage: printconfigsetting.py <file> <section> <setting>"
    sys.exit(1)

c = configobj.ConfigObj(file)

try:
    s = c[section]
except KeyError:
    print >>sys.stderr, "Section [%s] not found." % section
    sys.exit(1)

try:
    print s[key]
except KeyError:
    print >>sys.stderr, "Key %s not found." % key
    sys.exit(1)