When you try to sort a list of strings that contain numbers, the normal Python sort algorithm sorts lexicographically, so you might not get the results that you expect. `natsort` provides a function `natsorted` that helps sort lists 'naturally', either as real numbers (i.e. signed/unsigned floats or ints), or as versions.
When you try to sort a list of strings that contain numbers, the normal Python sort algorithm sorts lexicographically, so you might not get the results that you expect. `natsort` provides a function `natsorted` that helps sort lists 'naturally', either as real numbers (i.e. signed/unsigned floats or ints), or as versions.
To install py311-natsort, run the following command in macOS terminal (Applications->Utilities->Terminal)
sudo port install py311-natsort
To see what files were installed by py311-natsort, run:
port contents py311-natsort
To later upgrade py311-natsort, run:
sudo port selfupdate && sudo port upgrade py311-natsort
Reporting an issue on MacPorts Trac
The MacPorts Project uses a system called Trac to file tickets to report bugs and enhancement requests.
Though anyone may search Trac for tickets, you must have a GitHub account in order to login to Trac to create tickets.