Using a comparator function to sort

You’re passing the comparator as the key function. You should be passing it as the cmp, wrapped in some kind of function that turns it into a proper comparator. (Although actually, you should be using key functions: Also note that sortedDict will not actually be a dict, so the name is rather confusing.)

How to use pyinstaller?

I would suggest to first read the Using Pyinstaller section in the documentation of the module itself. You can also use some tutorials (e.g. Matt Borgerson’s one). In order to recap you should: write your script and make sure that it works run from the command line:~\ pyinstaller your_file_name.py this command will generate a your_file_name.spec file where you can include all the dll required … Read more