How can I disable mod_deflate in Apache2
OR
Don't know if this is a general solution, but it worked for me at least, to turn of mod_deflate for .py-files within a .htaccess file in a certain folder:
SetEnvIfNoCase Request_URI "\.py$" no-gzip dont-vary