Book contents
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 Getting started with IPython
- 3 A short Python tutorial
- 4 Numpy
- 5 Two-dimensional graphics
- 6 Three-dimensional graphics
- 7 Ordinary differential equations
- 8 Partial differential equations: a pseudospectral approach
- 9 Case study: multigrid
- Appendix A Installing a Python environment
- Appendix B Fortran77 subroutines for pseudospectral methods
- References
- Index
2 - Getting started with IPython
Published online by Cambridge University Press: 05 August 2014
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 Getting started with IPython
- 3 A short Python tutorial
- 4 Numpy
- 5 Two-dimensional graphics
- 6 Three-dimensional graphics
- 7 Ordinary differential equations
- 8 Partial differential equations: a pseudospectral approach
- 9 Case study: multigrid
- Appendix A Installing a Python environment
- Appendix B Fortran77 subroutines for pseudospectral methods
- References
- Index
Summary
Generalities
This sounds like software produced by Apple, but it is in fact a Python interpreter on steroids. It has been designed and written by scientists with the aim of offering very fast exploration and construction of code with minimal typing effort, and offering appropriate, even maximal, on-screen help when required. Documentation and much more is available on the website. This chapter is a brief introduction to the essentials of using IPython. A more extended discursive treatment can be found in, e.g., Rossant (2013).
IPython comes with three different user interfaces, terminal, qtconsole and notebook. If you have installed the recommended EPD distribution, then all three should be available to you. For the last two, additional software might be needed if you have used a different distribution. You can check what versions are available for your installation by issuing (at the command line) first ipython followed by the “return” key (RET). You can escape from IPython by typing exit followed by RET in the interpreter. Next try out the command ipython qtconsole following a similar strategy. Finally, try out the command ipython notebook. This should open in a new browser window. To escape from the third, you need CTL-C at the command line, plus closing the browser window. What is the difference between them?
Built into IPython is the GNU readline utility. This means that on the interpreter's current line, the left- and right-arrow keys move the cursor appropriately, and deletion and insertion are straightforward.
- Type
- Chapter
- Information
- Python for Scientists , pp. 11 - 19Publisher: Cambridge University PressPrint publication year: 2014