#!/usr/bin/env python

import sys

from ardj.settings import get

if len(sys.argv) not in (2, 3):
    print >> sys.stderr, "Usage: %s option_name [default]" % sys.argv[0]
    exit(1)

default = ""
if len(sys.argv) == 3:
    default = sys.argv[2]

value = get(sys.argv[1], default)
print value.encode("utf-8")
