Web-Books
in the Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Page - 215 -
  • User
  • Version
    • full version
    • text only version
  • Language
    • Deutsch - German
    • English

Page - 215 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Image of the Page - 215 -

Image of the Page - 215 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text of the Page - 215 -

A.5 WritingIPythonNotebooks 215 A.4.2 Basic IntrotoWakari After having logged in at thewakari.io site, you automatically enter an IPython notebookwith a short introduction to how the notebook can be used. Click on the New Notebook button to start a new notebook. Wakari enables creating and editingplainPythonfiles too: clickon theAddfile icon inpane to the left,fill in the programname, and you enter an editorwhere you canwrite a program. Pressing Execute launches an IPython session in a terminalwindow,whereyoucan run the programby run prog.py if prog.py is the name of the program. To download thefile, selecttest2.py in the left paneandclickon theDownloadfile icon. There isapull-downmenuwhereyoucanchoosewhat typeof terminalwindow youwant: aplainUnix shell, an IPythonshell, or an IPythonshellwithMatplotlib forplotting.Using the latter,youcanrunplainPythonprogramsorcommandswith graphics. Justchoosethetypeofterminalandclickon+Tab tomakeanewterminal windowof thechosen type. A.4.3 InstallingYourOwnPythonPackages Both SageMathCloud andWakari let you install your own Python packages. To install anypackagepackagenameavailableatPyPi15, run Terminal pip install --user packagename To install theSciTools package,which is usefulwhenworkingwith this book, run thecommand Terminal pip install --user -e \ git+https://github.com/hplgit/scitools.git#egg=scitools A.5 WritingIPythonNotebooks The IPython notebook is a splendid interactive tool for doing science, but it can also be used as a platform for developing Python code. You can either run it locally on your computer or in aweb service like SageMathCloudorWakari. In- stallation on your computer is trivial on Ubuntu, just sudo apt-get install ipython-notebook, and also onWindowsandMac16 by usingAnacondaorEn- thoughtCanopyfor thePython installation. The interface to the notebook is aweb browser: youwrite all the code and see all the results in thebrowserwindow. There are excellentYouTubevideosonhow to use the IPython notebook, so here we provide a very quick β€œstep zero” to get anyonestarted. 15https://pypi.python.org/pypi 16http://ipython.org/install.html
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2016
Language
English
License
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
248
Keywords
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Category
Informatik
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python