DOC: Add slide about __module__ attribute. scipy2010
authorChristopher Burns <chris.d.burns@gmail.com>
Tue, 29 Jun 2010 00:30:21 -0500
branchscipy2010
changeset 431 9126059d6b37
parent 430 f97ecb4e04a9
child 432 13e5d0e2cd40
DOC: Add slide about __module__ attribute.
day2/session3.tex
--- a/day2/session3.tex	Mon Jun 28 23:52:44 2010 -0500
+++ b/day2/session3.tex	Tue Jun 29 00:30:21 2010 -0500
@@ -399,6 +399,27 @@
   \end{description}
 \end{frame}
 
+\begin{frame}[fragile]
+  \frametitle{From which module?}
+  
+This plot function in pylab is cool, 
+from where do I import it to include it in 
+my\_nifty\_module.py?
+  
+\end{frame}
+
+\begin{frame}[fragile]
+  \frametitle{From which module?}
+  \begin{lstlisting}
+   
+In [15]: plot.__module__
+Out[15]: 'matplotlib.pyplot'
+
+from matplotlib.pyplot import plot
+
+  \end{lstlisting}
+\end{frame}
+
 \section{Objects}
 \begin{frame}{Everything is an Object!}
   \begin{itemize}