Going off Mark Bayer's answer , perhaps you can link it all together mimetypes(also from the standard library). You can determine the type of file and process it accordingly. The world needs a version of Python Archive::Extract, and we want you to write it!
source
share