Is there a simple way to sort files in a directory in python? The files I have in mind come in an ordering as
file_01_001 file_01_005 ... file_02_002 file_02_00
A much better solution is to use Tcl's "lsort -dictionary":
from tkinter import Tcl Tcl().call('lsort', '-dict', file_list)
Tcl dictionary sorting will treat numbers correctly, and you will get results similar to the ones a file manager uses for sorting files.