equal
deleted
inserted
replaced
122 \tableofcontents |
122 \tableofcontents |
123 % You might wish to add the option [pausesections] |
123 % You might wish to add the option [pausesections] |
124 \end{frame} |
124 \end{frame} |
125 |
125 |
126 \section{Creating and running scripts} |
126 \section{Creating and running scripts} |
|
127 \begin{frame}[fragile] |
|
128 \frametitle{Python Scripts} |
|
129 \begin{itemize} |
|
130 \item Let us now put all the commands used in the review problem into a file. |
|
131 \item The following commands of IPython help us do this. |
|
132 \end{itemize} |
|
133 \begin{lstlisting} |
|
134 In []: %hist |
|
135 In []: %hist -n |
|
136 \end{lstlisting} |
|
137 \end{frame} |
|
138 |
127 \begin{frame} |
139 \begin{frame} |
128 {Creating python files} |
140 \frametitle{Python Scripts\ldots} |
129 \begin{itemize} |
141 \begin{itemize} |
130 \item use your editor |
142 \item Open a new file in an \alert{editor} |
131 \item extension \typ{.py} |
143 \item Copy and paste required lines from the output of \typ{\%hist -n} |
132 \item in IPython using \kwrd{\%run} |
144 \item Save the file as \typ{first_plot.py} |
133 \end{itemize} |
145 \end{itemize} |
134 \inctime{5} |
146 \begin{itemize} |
|
147 \item run the file in IPython using \typ{\%run first_plot.py}\\ |
|
148 \end{itemize} |
135 \end{frame} |
149 \end{frame} |
136 |
150 |
137 \section{File Handling} |
151 \section{File Handling} |
138 \begin{frame}[fragile] |
152 \begin{frame}[fragile] |
139 \frametitle{File and \kwrd{for}} |
153 \frametitle{File and \kwrd{for}} |