With the package Pythontex, I want to input a Python file into a pyverbatim environment :
For example, I tried the code :
\begin{pyverbatim}
\input{file_1.py}
\end{pyverbatim}
where file_1.py is a Python file .
But I obtained as result:
\input{file_1.py}
and not the file_1.py's content.
How can I do it?
Update. I tried:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pythontex}
\usepackage{verbatim}
\begin{document}
\begin{pyverbatim}
\VerbatimInput{contenus/fichier_1.py}
\end{pyverbatim}
\end{document}
and I obtained
\VerbatimInput{contenus/fichier_1.py}
as result.

pyverbatim? – egreg Mar 16 '18 at 20:49\verbatiminput{file_1.py}? – egreg Mar 16 '18 at 21:40minted? – egreg Mar 17 '18 at 09:42