It is possible to run Python code within a LaTeX document - see link. Is it as well possible to deploy the code in a *.py file and to call the code
![How to highlight Python syntax in LaTeX Listings \lstinputlistings command - TeX - LaTeX Stack Exchange How to highlight Python syntax in LaTeX Listings \lstinputlistings command - TeX - LaTeX Stack Exchange](https://i.stack.imgur.com/Wb9xV.png)
How to highlight Python syntax in LaTeX Listings \lstinputlistings command - TeX - LaTeX Stack Exchange
![line breaking - Why doesn't listings' breaklines work on the colon character - TeX - LaTeX Stack Exchange line breaking - Why doesn't listings' breaklines work on the colon character - TeX - LaTeX Stack Exchange](https://i.stack.imgur.com/EVK5O.png)