Example #1
0
def main():
  parser = server.make_config_parser()
  shell.add_parser_arguments(parser)
  conf = parser.parse_args()

  s = shell.Shell(ServerShell, conf, banner1=BANNER)

  if conf.filename is not None:
    with open(conf.filename, "r") as f:
      s.thread.do(s.ex, f.read())
  else:
    s.mainloop()
Example #2
0
def main():
    parser = server.make_config_parser()
    shell.add_parser_arguments(parser)
    conf = parser.parse_args()

    s = shell.Shell(ServerShell, conf, banner1=BANNER)

    if conf.filename is not None:
        with open(conf.filename, "r") as f:
            s.thread.do(s.ex, f.read())
    else:
        s.mainloop()
Example #3
0
def main():
  parser = client.make_config_parser()
  parser.add_argument("credentials", help="Credentials to mint.")
  parser.add_argument("--token-expiry",
                      help="When to expire credentials. NOTE: Credentials "
                           "cannot be revoked without generating a new minting "
                           "key pair!", type=int, default=100)
  shell.add_parser_arguments(parser)

  conf = parser.parse_args()

  s = shell.Shell(ClientShell, conf, banner1=BANNER)

  if conf.filename is not None:
    with open(conf.filename, "r") as f:
      s.thread.do(s.ex, f.read())
  else:
    s.mainloop()
Example #4
0
def main():
    parser = client.make_config_parser()
    parser.add_argument("credentials", help="Credentials to mint.")
    parser.add_argument("--token-expiry",
                        help="When to expire credentials. NOTE: Credentials "
                        "cannot be revoked without generating a new minting "
                        "key pair!",
                        type=int,
                        default=100)
    shell.add_parser_arguments(parser)

    conf = parser.parse_args()

    s = shell.Shell(ClientShell, conf, banner1=BANNER)

    if conf.filename is not None:
        with open(conf.filename, "r") as f:
            s.thread.do(s.ex, f.read())
    else:
        s.mainloop()