<br /><br />#coding=utf-8<br /><br />import os<br /><br />def remove_pos(dir):<br /> for root, dirs, files in os.walk(dir,topdown=False):<br /> for name in files:<br /> if os.path.splitext(name)[1] == '.po' and name[0:2] != 'zh':<br /> os.remove(os.path.join(root,name))<br /><br />if __name__ == "__main__":<br /> remove_pos("c:\openerp_osbzr")<br /><br /><br />