I am a beginner in Latex/Python and try to run the file below on my Mac (10.8.4 - latest MacTex). This is just a test file and it is not running. Python is running in the console and I have copied python.sty into the folder "library/texmf".
Can you tell me what the problem might be? Would be really helpful. I couldnt find any solution on the internet. Thanks in advance!!!
Andreas
CODE
%& -shell-escape
\documentclass{article}
\usepackage{python}
\begin{document}
Say hello Python:
\begin{python}%
print "hi"
\end{python}%
\end{document}
Message from Latex
This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013)
restricted \write18 enabled.
entering extended mode
(./Ohne-Titel.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2013/texmf-dist/tex/latex/python/python.sty)
(./Ohne-Titel.aux)
! I can't find file `Ohne-Titel.py.out'.
<to be read again>
\def
l.10 \end{python}
%
(Press Enter to retry, or Control-D to exit)
Please type another input file name:



%& -shell-escapeis sufficient to enable shell escape and the second line in the log file confirms it:restrictedshould not appear in that case. Are you callingxelatexfrom the terminal or from a front-end such as TeXShop? – egreg Oct 03 '13 at 20:32