style_transfer.py 文件源码

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

项目:style_transfer 作者: crowsonkb 项目源码 文件源码
def print_args():
    """Prints out all command-line parameters."""
    bg = terminal_bg()
    if bg is True:
        style = 'xcode'
    elif bg is False:
        style = 'monokai'

    pprint = print_
    try:
        if bg is not None:
            import pygments
            from pygments.lexers import Python3Lexer
            from pygments.formatters import Terminal256Formatter
            pprint = partial(pygments.highlight, lexer=Python3Lexer(),
                             formatter=Terminal256Formatter(style=style), outfile=sys.stdout)
    except ImportError:
        pass
    print_('Parameters:')
    for key in sorted(ARGS):
        v = repr(getattr(ARGS, key))
        print_('% 14s: ' % key, end='')
        pprint(v)
    print_()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号