帮助文件名自然或“类似人类”排序的实用程序
FilenameSort的Python项目详细描述
filenamesort是一个实用程序,用于帮助对文件名进行自然或“类似人类”的排序。
通常使用sort,[“file_1_10a.png”,“file_1_1a.png”,“file_1_5a.png”]将排序为: [“file_1_10a.png”,“file_1_1a.png”,“file_1_5a.png”]
改用getSortableList函数会导致: [“file_1_1a.png”,“file_1_5a.png”,“file_1_10a.png”]
这更像是人们所期望的。