def main():
    parser = argparse.ArgumentParser(description='Run a Senpy server')
    parser.add_argument('--level',
                        "-l",
                        metavar="logging_level",
                        type=str,
                        default="INFO",
                        help='Logging level')
    parser.add_argument('--debug',
                        "-d",
                        action='store_true',
                        default=False,
                        help='Run the application in debug mode')
    parser.add_argument('--default-plugins',
                        action='store_true',
                        default=False,
                        help='Load the default plugins')
    parser.add_argument('--host',
                        type=str,
                        default="127.0.0.1",
                        help='Use 0.0.0.0 to accept requests from any host.')
    parser.add_argument('--port',
                        '-p',
                        type=int,
                        default=5000,
                        help='Port to listen on.')
    parser.add_argument('--plugins-folder',
                        '-f',
                        type=str,
                        default="plugins",
                        help='Where to look for plugins.')
    args = parser.parse_args()
    logging.basicConfig(level=getattr(logging, args.level))
    app = Flask(__name__)
    app.debug = args.debug
    sp = Senpy(app, args.plugins_folder, default_plugins=args.default_plugins)
    sp.activate_all()
    http_server = WSGIServer((args.host, args.port), app)
    try:
        print("Server running on port %s:%d. Ctrl+C to quit" % (args.host,
                                                                args.port))
        http_server.serve_forever()
    except __HOLE__:
        http_server.stop()
        print("Bye!")
dataset/ETHPy150Open gsi-upm/senpy/senpy/__main__.py/main