没有评论来自不同文件类型
no_comments的Python项目详细描述
从各种文件类型中删除注释的简单方法。
说明:
注释剥离实用程序。处理内联注释和块注释。 带缺省的C/C++注释(内联和块)。
用法:
- cat source_code_file | no_comments > out
特点:
- strip only inline comments / block comments
- configurable delimiters
- strip only comments at the beggining of the line
- preserve empty lines which contained comments before
安装:
- easy_install no_comments or pip install no_comments
- run no_comments –help
注:
这个实用程序是愚蠢的-因为它不是特定于语言的,它不理解语法(它 将删除字符串中的注释,忽略嵌套的注释等)。