summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Burns2010-06-29 00:30:21 -0500
committerChristopher Burns2010-06-29 00:30:21 -0500
commit22e1ca7385237831eb3e371070b377fe6e467ac2 (patch)
tree3a6843dc9bf6ce072be993b14f6b144e7c26fd3a
parent4d083f828be9b026dd9efd1a2ca34142a7be3705 (diff)
downloadworkshops-more-scipy-22e1ca7385237831eb3e371070b377fe6e467ac2.tar.gz
workshops-more-scipy-22e1ca7385237831eb3e371070b377fe6e467ac2.tar.bz2
workshops-more-scipy-22e1ca7385237831eb3e371070b377fe6e467ac2.zip
DOC: Add slide about __module__ attribute.
--HG-- branch : scipy2010
-rw-r--r--day2/session3.tex21
1 files changed, 21 insertions, 0 deletions
diff --git a/day2/session3.tex b/day2/session3.tex
index 463f22a..1714b71 100644
--- a/day2/session3.tex
+++ b/day2/session3.tex
@@ -399,6 +399,27 @@ sp.linspace(-5 * sp.pi, 5 * sp.pi, 500)
\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}