Software for CS111
This page provides links to download software for this class onto your personal laptop. In an ideal scenario, all three programs would be downloaded to your personal laptop before the first day of class.
CS111 students need the following:
- Thonny (to write/run Python code)
- Download and run a test Jupyter notebook (see details below)
- Test the
111Downloader.pyscript on your computer (see details below)
If you encounter problems with the installation process, please email Peter Mawhorter (pmawhort).
You can download installers for Thonny below. By clicking on the blue links below, the installer will automatically download to your machine. Double-click on the installer, and it will start the process of installing Thonny.
You'll see this screen when the installer starts (although note that we're now going to be using version 4.1.2, not 3.3.13):
Click through each of the sections (License, Destination Select, Installation Type, Installation, Summary). When given options, if you are uncertain, use the default suggested by the installer. Eventually, you will arrive at this screen:
which tells you that Thonny was successfully installed on your machine. We will review how to use Thonny during the first lab.
2. Test a Jupyter notebook
We'll use Jupyter notebooks in lab where you can write and run python code.
Please use this link to download a zip file containing the
launchNotebook.py program and a Jupyter notebook for testing.
- Clicking on the link above should automatically download the
cs111_setup.zipfile to your computer. This file should end up in your
- In the
Downloadsfolder, Unzip the
cs111_setup.zipfile, which creates the folder
cs111. Some systems automatically unzip the file to create the folder. If not, you'll need to do it manually:
- To unzip a
.zipfile on a Mac, double-click it.
- To unzip a
.zipfile on Windows, right-click and choose Extract here.
- To unzip a
- Move this cs111 folder to a place where you want to keep it all semester. Your Desktop is one easy place to put it, but you could also put it in your Documents folder, or another folder where you keep your class files organized.
Using Thonny, open the
launchNotebook.pyfile in the
cs111folder, wherever you placed it. To do this in Thonny, from the File menu, select Open, and navigate to your
cs111folder, and the
launchNotebook.pyfile within the
launchNotebook.pyand press the Open button. At this point, your Thonny window should be displaying the
launchNotebook.pyfile in the editor pane at the top of the window, and the Python shell at the bottom of the window should be mostly empty, like this:
Click the Thonny run button (or choose Run current script from the Run menu) to run the
launchNotebook.pyfile. It may take a moment because it has to install some things, but this should only be necessary once. It should display a bunch of output in the Pythton shell at the bottom of the Thonny window, and eventually launch a tab in your web browser, displaying the contents of the
cs111folder. You will use this tab (which you can get back by running
launchNotebook.pyagain) to launch all of the notebooks for this class.
Note: If you get an error message at this step saying "looks like this file or folder is not writeable" it probably means you are on Windows and have forgotten to unzip the zip file.
In the browser tab, navigate to the
notebook_testfolder and open the
cs111_setup_test.ipynbfile you find there. This will open a second browser tab which runs the notebook.
Make sure the notebook is working. Follow the directions in the notebook and confirm that it displays the message "Python is working in this notebook" (in addition to the code which has that message along with extra quotation marks and commas). It should look like this:
If you run into trouble following these steps, please email Prof. Mawhorter (pmawhort) for help.
For lectures and exercises in this class, you will be downloading zip files
containing notebooks. Once you have extracted these zip files, you should put
the resulting folders into the
cs111 folder you created in this step.
3. Test the Downloader Script
For your convenience, we've provided a downloader script which checks the CS 111 website for updates and downloads any new files it finds, unzipping any zip files automatically. You can simply run this script to check for and download new lecture, exercise, project, and lab files. For now, you should run it once to make sure it works on your system, by following these instructions:
111Downloader.pyscript is included in the
cs111folder that you unzipped in the previous section. Just like
launchNotebook.py, open it using Thonny.
- Run the script, and it should display messages about what it's searching for and what it downloads. For now, it should download at least the first week's exercises, since those are already linked on the schedule.
- Check your
cs111folder for a new
exercisesfolder that contains a sub-folder for the week 1 exercises.
As before, if you have any problems running the downloader script please email Prof. Mawhorter (pmawhort) for help.
Links to Notebook Launchers
These links have the most recent version of a few different scripts that
are useful for managing Jupyter Notebooks, in case you need to download them individually. Each of these is included in the
cs111 folder you already downloaded, but they may be updated here if necessary as the semester progresses. If you need to re-download one of them, right-click and select "save as" to download the file.
launchNotebook.pyis the basic notebook launcher. We'll include copies of this in the zip files for lectures and exercises.
stopNotebooks.pycan be run to stop any currently running notebooks. MAKE SURE YOU SAVE YOUR WORK FIRST! Might be useful if
launchNotebookis getting stuck and refusing to launch a new server and/or if you have run
launchNotebookmany times in different directories and want to clean things up a bit.
clearNotebook.pycan be used to clear out all of output from a notebook. This can be useful if you've created an infinite loop that put too much output into a notebook for you to open it properly. You need to copy this file into the same directory as the notebook you want to clear out, then follow the instructions in the file.