Options +ExecCGI
AddHandler cgi-script .py
<FilesMatch "^-$">
  SetHandler cgi-script
</FilesMatch>
DirectoryIndex -