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
When including Python code in a LaTeX document, how can I specify exactly how comment strings start and end? - Quora
![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)
line breaking - Why doesn't listings' breaklines work on the colon character - TeX - LaTeX Stack Exchange
![How to create this beautiful Python highlighting in LaTeX with listings? - TeX - LaTeX Stack Exchange How to create this beautiful Python highlighting in LaTeX with listings? - TeX - LaTeX Stack Exchange](https://i.stack.imgur.com/nS450.png)
How to create this beautiful Python highlighting in LaTeX with listings? - TeX - LaTeX Stack Exchange
![Why does LaTeX replace some spaces with brackets or underscores in the listings environment? - TeX - LaTeX Stack Exchange Why does LaTeX replace some spaces with brackets or underscores in the listings environment? - TeX - LaTeX Stack Exchange](https://i.stack.imgur.com/4muX2.png)