This is a small framework explaining how to run python directly from LaTex. We use this to generate personalized exams. See this presentation.
foo@bar:~$ MATRICULATIONID=132 SEED=12 pdflatex --enable-pipes --shell-escape exam.texCompiles the pdf using SEED as the seed for the pseudo-random engine: make sure to use a seed that is a function of the matriculationid, like that the generation process is determinsitic for every student.
I would like to thank my Ph.D students Immanuel Haffner, Marcel Maltry, Christian Schön, and Joris Nix for contributing to this project (beyond this dummy example in this repository).


