hotplugger
hotplugger copied to clipboard
Some improvements to the monitor script
I made it so that it prints out only the shortest entries. I changed your unique() function to be a little shorter but added another function that removes longer entries. I also removed a bit where you ask to hit ENTER to continue since this step takes a little bit of time without the necessity - you can just unplug the device you have in the port or plug the device into the port, and it will register the port correctly on any of these actions. I also added saving the found ports to a file so that you don't lose them in the process.