# error while running latex code with embedded python code

I am trying to run python code within my latex code. i tried simple hellow world example but i have occured through this error . my latex file name is pyinlt.tex

Error:

i can't find file 'pyinlt.py.out'
\def


Source file:

\documentclass{article}
\usepackage{python}
\begin{document}
Say hello Python:
\begin{python}
print r"Hello \LaTeX!"
\end{python}
\end{document}


## migrated from stackoverflow.comJun 11 '14 at 21:25

This question came from our site for professional and enthusiast programmers.

• Please post the contents of the pyinlt.log file. – pts May 11 '14 at 15:14
• Try to compile it with latex -shell-escape pyinlt.tex – pts May 11 '14 at 15:15
• Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner Jun 11 '14 at 23:23

python environnement requires some privilege that are disabled by default. The way to compile is to enable them by using -shell-escape at compilation time:
latex -shell-escape pyinlt.tex