The programming language Python is widely used within many scientific domains nowadays and the language is readily accessible to scholars from the Humanities. Python is an excellent choice for dealing with (linguistic as well as literary) textual data, which is so typical of the Humanities. In this tutorial you will be thoroughly introduced to the language and be taught to program basic algorithmic procedures. This tutorial expects no prior experience with programming, although we hope to provide some interesting insights and skills for more advanced programmers as well. The tutorial consists of six chapters.
In the course we will be using iPython Notebook software that works best with Google Chrome, Firefox and Safari will also work. Internet Explorer is not supported!
We will be using Python 3 in this tutorial, so lower versions of Python are not sufficient. Below we describe the installation procedure for Python and the necessary dependencies for this tutorial.
We also recommend you to install a good text editor, such as Sublime text 2. You are of course absolutely free to use your own favourite editor.
. mac-installer.sh(note the initial period)
ipython3 notebookIf everything went well this should open your browser (best with Google Chrome or Firefox) on the page http://127.0.0.1:8888/ which says IP[y]: Notebook.
Ubuntu 12.10 and above:
sudo apt-get install python3 ipython3 ipython3-notebook
If you are on another distribution, look for similar packages. If no package like ipython3-notebook is available for your distribution (such as on Ubuntu 12.04 and below). Then follow the below procedure instead. Adapt the lines with apt-get lines for your package manager, on Fedora/RedHat/CentOS and SuSE this will be yum instead:
sudo apt-get remove ipython3
sudo apt-get install python3 python3-setuptools
sudo easy_install3 tornado
sudo easy_install3 zmq
sudo easy_install3 ipython
To open the interactive notebooks locally:
On Mac and Linux:
On Windows with Pyzo (assuming default installation):
If you do not want to install the ipython notebook or just want to see what the tutorial is about, you can check out the static notebooks below.