cmpGen is a very simple python utility (2 line function) to aid in sorting.