From 22e1ca7385237831eb3e371070b377fe6e467ac2 Mon Sep 17 00:00:00 2001 From: Christopher Burns Date: Tue, 29 Jun 2010 00:30:21 -0500 Subject: DOC: Add slide about __module__ attribute. --HG-- branch : scipy2010 --- day2/session3.tex | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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} -- cgit