def run_fypp():
'''Run the Fypp command line tool.'''
options = FyppOptions()
optparser = get_option_parser()
opts, leftover = optparser.parse_args(values=options)
infile = leftover[0] if len(leftover) > 0 else '-'
outfile = leftover[1] if len(leftover) > 1 else '-'
try:
tool = Fypp(opts)
tool.process_file(infile, outfile)
except FyppStopRequest as exc:
sys.stderr.write(_formatted_exception(exc))
sys.exit(USER_ERROR_EXIT_CODE)
except FyppFatalError as exc:
sys.stderr.write(_formatted_exception(exc))
sys.exit(ERROR_EXIT_CODE)
评论列表
文章目录