def die(msg, code=-1):
    """Writes msg to stderr and exits with return code"""
    sys.stderr.write(msg + "\n")
    sys.exit(code)
def die(msg, code=-1):
    """Writes msg to stderr and exits with return code"""
    sys.stderr.write(msg + "\n")
    sys.exit(code)
Writes msg to stderr and exits with return code