Getting started in Python

Download and install Python. It is available in open source for Windows, Mac and Linux. For this course, Python 3.1 or higher is needed.

Additionally, locate or install a code editor. Good example include SublimeTextBrackets, IDLE or  Atom.

If Python has been installed correctly, you can install the Jupyter Notebooks environment via the following commands:

python3 -m pip install --upgrade pip
python3 -m pip install jupyter

An alternative is to install the Anaconda installation of Python.

After Python has been installed correctly, follow the steps below to run your programs in the Command Prompt.

On Windows


  • Create a folder named “DTDP”. On the Windows machines in the computer lab at the Lipsius building, this folder should be created on the following location: P:\My Documents\DTDP
  • If your DTDP folder is located under P:\My Documents\DTDP, you can make use of the existing openPrompt.bat file. Download it and save it on the desktop.
  • If your DTDP folder was created on a different location, open a code editor and copy and paste the following code. Supply the full path to your DTDP folder in between the brackets.

cmd.exe /K "[Full Path to the DTDP folder]:"
  • Create a Python program file, and save it in the root of the DTDP folder.
  • Run the file in the Comman Prompt, by typing in “python” followed by a space and the name of the program that you want to run.


On Mac


In Mac OS X Lion 10.7 or later systems, you can follow the steps below:

  • Open System Preferences > Keyboard > Shortcuts > Services
  • Under Services, enable New Terminal at Folder, by placing a check in front of this function.
  • Create a folder named “DTDP” on your computer.
  • Write some code which can be executed and save it in your DTDP folder in a code editor.
  • Open the Finder, and navigate to your DTDP folder. Click on the name of the folder to highlight it. Next, choose Finder > Services > New Terminal at folder
  • Run your program in the Terminal, by typing in “python” followed by a space and the name of the program.