def sumstat_main():
    """Console entry-point"""
    options, args = sumstat_parse_args()
    stat_dict = sumstat(fh=sys.stdin, *args, **options)

    table = PrettyTable([
        "Num. Samples / Cumulative Value (N)",
        "Num. Values (M)",
        "Min. Value",
        "Max. Value",
        "Average Value",
        "10th Percentile",
        "25th Percentile",
        "50th Percentile",
        "75th Percentile",
        "90th Percentile",
        "95th Percentile",
        "99th Percentile",
        "99.9th Percentile"
    ])
    table.add_row(
        map(lambda x: locale.format('%d', x, True), [stat_dict['N'], stat_dict['M']]) +  # noqa
        [stat_dict['min'], stat_dict['max'], stat_dict['avg']] + \
        stat_dict['percentiles']
    )
    print table

    S10th, S25th, S40th, S50th, S75th, S90th = stat_dict['cover']
    M = stat_dict['M']
    print("10%% of Sample Volume is encompassed within the top %s (%.4f%%) sample values" %  # noqa
          (locale.format("%d", S10th, True), 100.*M/S10th))
    print("25%% of Sample Volume is encompassed within the top %s (%.4f%%) sample values" %  # noqa
          (locale.format("%d", S25th, True), 100.*S25th/M))
    print("40%% of Sample Volume is encompassed within the top %s (%.4f%%) sample values" %  # noqa
          (locale.format("%d", S40th, True), 100.*S40th/M))
    print("50%% of Sample Volume is encompassed within the top %s (%.4f%%) sample values" %  # noqa
          (locale.format("%d", S50th, True), 100.*S50th/M))
    print("75%% of Sample Volume is encompassed within the top %s (%.4f%%) sample values" %  # noqa
          (locale.format("%d", S75th, True), 100.*S75th/M))
    print("90%% of Sample Volume is encompassed within the top %s (%.4f%%) sample values" %  # noqa
          (locale.format("%d", S90th, True), 100.*S90th/M))

    return 0
dataset/ETHPy150Open adamhadani/logtools/logtools/_sumstat.py/sumstat_main/swapped operands of `/`