I want to use a python script to call it in the pam_exec module.
The first answer in this question says that I can't use a python script and a PAM module together.
First off - you cannot use python code as a PAM module, it has to be compiled code that satisfies certain interface requirements. See here for more info.
Here we are clearly given to understand that pam_exec is a PAM module.
pam_exec - PAM module which calls an external command
So is it possible to use python or not? (This also applies to my previous question.)