def main():
    import sys
    import tornado.options
    from tornado.options import define, options, parse_command_line
    define("key", help="the signing key", type=str)
    args = parse_command_line()
    if not options.key:
        tornado.options.print_help()
        sys.exit()

    qs = args[0]
    if qs and qs[0] == "?":
        print("Invalid query string, should not include leading '?'")
        sys.exit()
    print("Query String: %s" % qs)
    print("Signature: %s" % derive_signature(options.key, qs))
    print(sign(options.key, qs) % "Signed Query String: %s")
dataset/ETHPy150Open agschwender/pilbox/pilbox/signature.py/main/swapped operands of `%`