I have the following MWE using pythontex:
%& -shell-escape
\documentclass{article}
\usepackage{pythontex}
\newcommand{\printPython}[1]{
\py{print(r'Hello, #1')}%
\newline
}
\begin{document}
Say hello Python:
%\begin{python}%
%print r"Hello \LaTeX!"
%\end{python}%
\printPython{4}
\begin{pycode}
print(r"\centering")
print(r"\textit{A message from Python!}")
\end{pycode}
\end{document}
When compiling, the result is
Say hello Python:
Hello, 4 None
A message from Python!
Where does the None come from, and how do I remove it?
\pywith\pyc, but nevertheless I am interested in the reason here. – arc_lupus Mar 12 '16 at 11:15