playnano.cli.entrypoint module

The playnano command: argument parsing and dispatch to the subcommands.

playnano.cli.entrypoint.main() → None[source]

Run the playnano command.

Parses the command line, sets the log level (--log-level) and runs the subcommand:

Run playnano <subcommand> --help for each subcommand’s options.

Exit status is 0 on success; 1 if the command fails (the subcommands log the error and exit with 1); 2 for a usage error, including no subcommand, or an unexpected error.

playnano.cli.entrypoint.make_fps_type(fallback: float)[source]

Make an argparse type that reads a frame rate, with a fallback.

Parameters:

fallback (float) – Frame rate used, with a logged warning, when the value is not a number.

Returns:

Function that converts the option’s text to a float.

Return type:

callable

playnano.cli.entrypoint.setup_logging(level: int = 20) → None[source]

Set the log format and level for the command line.

Parameters:

level (int, optional) – Logging level, for example logging.DEBUG. Default is logging.INFO.