def __fatal(exitcode, message):
''' Takes exit code and error message as an arguments
This method prints the error message on the stderr and exists with
the provided exitcode.
'''
print >> sys.stderr, "%s: %s" % (os.path.basename(sys.argv[0]), message)
# Shouldn't really be necessary as the stderr stream should be unbuffered.
sys.stderr.flush()
sys.exit(exitcode)