How to use the pingparsing.cli.TimestampFormat function in pingparsing

To help you get started, we’ve selected a few pingparsing examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thombashi / pingparsing / pingparsing / cli.py View on Github external
default=logbook.INFO,
        help="for debug print.",
    )
    group.add_argument(
        "--quiet",
        dest=loglevel_dest,
        action="store_const",
        const=QUIET_LOG_LEVEL,
        default=logbook.INFO,
        help="suppress execution log messages.",
    )

    group = parser.add_argument_group("Ping Options")
    group.add_argument(
        "--timestamp",
        choices=TimestampFormat.LIST,
        default=TimestampFormat.NONE,
        help="""[Only for LINUX]
        {}: no timestamps.
        {}: add timestamps with UNIX epoch time format.
        {}: add timestamps with ISO time format.
        """.format(
            TimestampFormat.NONE, TimestampFormat.EPOCH, TimestampFormat.DATETIME
        ),
    )
    group.add_argument(
        "-c",
        "--count",
        type=int,
        help="""Stop after sending the count.
        see also ping(8) [-c count] option description.
        """,