def trail_space(self, filters=lambda p: p.ext == "<STR_LIT>"):  
self.assert_is_dir_and_exists()<EOL>for p in self.select_file(filters):<EOL><INDENT>try:<EOL><INDENT>with open(p.abspath, "<STR_LIT:rb>") as f:<EOL><INDENT>lines = list()<EOL>for line in f:<EOL><INDENT>lines.append(line.decode("<STR_LIT:utf-8>").rstrip())<EOL><DEDENT><DEDENT>with open(p.abspath, "<STR_LIT:wb>") as f:<EOL><INDENT>f.write("<STR_LIT:\n>".join(lines).encode("<STR_LIT:utf-8>"))<EOL><DEDENT><DEDENT>except Exception as e:  <EOL><INDENT>raise e<EOL><DEDENT><DEDENT>
Trail white space at end of each line for every ``.py`` file.

**中文文档**

将目录下的所有被选择的文件中行末的空格删除。