I am running a pdflatex command using subprocess.run(["pdflatex", "-interaction=nonstopmode", "file.tex"]) So that if
pdflatex
subprocess.run(["pdflatex", "-interaction=nonstopmode", "file.tex"])