Running VPython from inside LaTeX

Joe Heafner <[email protected]> Fri, 20 Dec 2013 20:00:59 -0500
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
I found this a few days ago. I=92m running OS X 10.9.1 with Python 2.7.3 an=
d the latest VPython 5.

http://python-in-the-lab.blogspot.com/2013/11/running-python-code-in-latex-=
document.html

When I process the following LaTeX source the output indicates that there=
=92s no module named visual. Yet when I put the two lines of Python in a se=
parate file and run it form a Terminal window it works perfectly. Am I spec=
ifying the correct python executable in the \usepackage line that loads the=
 python package?

\documentclass{article}

\usepackage[bin=3Dpython2.7]{python}
\usepackage{amsmath}

\begin{document}

\begin{python}
from visual import *
sphere()
\end{python}


\end{document}



Joe Heafner
Sent from one of my Macs


---------------------------------------------------------------------------=
---
Rapidly troubleshoot problems before they affect your business. Most IT =

organizations don't have a clear picture of how application performance =

affects their revenue. With AppDynamics, you get 100% visibility into your =

Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics P=
ro!
http://pubads.g.doubleclick.net/gampad/clk?id=3D84349831&iu=3D/4140/ostg.cl=
ktrk