How to Find the Path of an Executable in Python?
Python’s shutil.which(cmd) function returns the path to the executable that would run if you called cmd in the command line. If there is no such executable, it returns None. The shutil module is part of the standard library, so you only need to add the statement “import shutil” to your program without needing to install … Read more