cli.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:inspire-crawler 作者: inspirehep 项目源码 文件源码
def _show_file(file_path, header_name='Shown'):
    if file_path.startswith('file:/'):
        file_path = file_path[6:]

    click.secho("%s file: %s" % (header_name, file_path), fg='blue')
    if not os.path.exists(file_path):
        click.secho('    The file does not exist', fg='yellow')
    else:
        with open(file_path) as fd:
            click.echo_via_pager(fd.read())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号