This is an old script that looks for the DRM flag in AZW/MOBI files and prints out "DRM" or "DRM-free" and then the filename. It still seems to work, even for newer versions of Amazon DRM.
I suggest first confirming that it works on one .azw file (with echo on):
Code:
kindledrm filename.azw
If not, then there is something wrong with your Python install.