Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提供选项控制输出 #44

Open
ghost opened this issue May 3, 2013 · 4 comments
Open

提供选项控制输出 #44

ghost opened this issue May 3, 2013 · 4 comments
Assignees

Comments

@ghost
Copy link

ghost commented May 3, 2013

建议提供 debug 选项控制类似下面这样的输出

print >> sys.stderr, f_name, ' at line', lineno, line
@ghost ghost assigned fxsjy May 3, 2013
@fxsjy
Copy link
Owner

fxsjy commented May 6, 2013

@shuge , 什么样的控制?是控制让这些日志不显示,还是说输出到其他地方?

@ghost
Copy link
Author

ghost commented May 6, 2013

def foo(..., debug=False, log_file=sys.stderr):
    if debug:
        print >> log_file, f_name, ' at line', lineno, line
    ...

您觉得这样会不会更好些?

@fxsjy
Copy link
Owner

fxsjy commented May 6, 2013

@shuge , 好的,谢谢你的建议。你要是能给我发pull request就更好了:-)

@ghost
Copy link
Author

ghost commented May 6, 2013

稍后吧,我上周临时用 pymmseg + AdvancdLangConv 解决了
jieba 是一个很有意思的项目

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant