# Path: pypinyin/compat.py
# PY2 = sys.version_info < (3, 0)


from argparse import ArgumentParser
from pypinyin.compat import PY2
import logging
import sys
import pypinyin
                        default='-')
    parser.add_argument('-e', '--errors',
                        help=('how to handle none-pinyin string'
                              ' (default: "default")'),
                        choices=['default', 'ignore', 'replace'],
                        default='default')
    # 输出多音字
    parser.add_argument('-m', '--heteronym', help='enable heteronym',
                        action='store_true')
    # 要查询的汉字
    parser.add_argument('hans', help='chinese string')
    return parser


def main():
    # 禁用除 CRITICAL 外的日志消息
    logging.disable(logging.CRITICAL)

    # read hans from stdin
    if not sys.stdin.isatty():
        pipe_data = sys.stdin.read().strip()
    else:
        pipe_data = ''
    args = sys.argv[1:]
    if pipe_data:
        args.append(pipe_data)

    # 获取命令行选项和参数
    parser = get_parser()
    options = parser.parse_args(args)

# Path: pypinyin/compat.py
# PY2 = sys.version_info < (3, 0)


# Path: pypinyin/runner.py
from argparse import ArgumentParser
from pypinyin.compat import PY2
import logging
import sys
import pypinyin

                        default='-')
    parser.add_argument('-e', '--errors',
                        help=('how to handle none-pinyin string'
                              ' (default: "default")'),
                        choices=['default', 'ignore', 'replace'],
                        default='default')
    # 输出多音字
    parser.add_argument('-m', '--heteronym', help='enable heteronym',
                        action='store_true')
    # 要查询的汉字
    parser.add_argument('hans', help='chinese string')
    return parser


def main():
    # 禁用除 CRITICAL 外的日志消息
    logging.disable(logging.CRITICAL)

    # read hans from stdin
    if not sys.stdin.isatty():
        pipe_data = sys.stdin.read().strip()
    else:
        pipe_data = ''
    args = sys.argv[1:]
    if pipe_data:
        args.append(pipe_data)

    # 获取命令行选项和参数
    parser = get_parser()
    options = parser.parse_args(args)

    if PY2: