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.
Best Answer
I guess you want
\inputpygments
: