summaryrefslogtreecommitdiff
path: root/day1/session2.tex
diff options
context:
space:
mode:
authorPuneeth Chaganti2009-10-23 12:24:52 +0530
committerPuneeth Chaganti2009-10-23 12:24:52 +0530
commit916192a294ca1206b55889c7889a0703f68f430c (patch)
treedcb069245089776052c3dc24b784034666ed5727 /day1/session2.tex
parentfda5dfbbc37ea3db76b390e2818134baef0ac265 (diff)
downloadworkshops-916192a294ca1206b55889c7889a0703f68f430c.tar.gz
workshops-916192a294ca1206b55889c7889a0703f68f430c.tar.bz2
workshops-916192a294ca1206b55889c7889a0703f68f430c.zip
Added IPython history to Day1 Session2.
Diffstat (limited to 'day1/session2.tex')
-rw-r--r--day1/session2.tex24
1 files changed, 19 insertions, 5 deletions
diff --git a/day1/session2.tex b/day1/session2.tex
index 06fa0b4..fc24aad 100644
--- a/day1/session2.tex
+++ b/day1/session2.tex
@@ -124,14 +124,28 @@
\end{frame}
\section{Creating and running scripts}
+\begin{frame}[fragile]
+\frametitle{Python Scripts}
+\begin{itemize}
+\item Let us now put all the commands used in the review problem into a file.
+\item The following commands of IPython help us do this.
+\end{itemize}
+\begin{lstlisting}
+ In []: %hist
+ In []: %hist -n
+\end{lstlisting}
+\end{frame}
+
\begin{frame}
- {Creating python files}
+\frametitle{Python Scripts\ldots}
\begin{itemize}
- \item use your editor
- \item extension \typ{.py}
- \item in IPython using \kwrd{\%run}
+ \item Open a new file in an \alert{editor}
+ \item Copy and paste required lines from the output of \typ{\%hist -n}
+ \item Save the file as \typ{first_plot.py}
+ \end{itemize}
+ \begin{itemize}
+ \item run the file in IPython using \typ{\%run first_plot.py}\\
\end{itemize}
-\inctime{5}
\end{frame}
\section{File Handling}