Showing posts from August, 2018

Roll your own interactive Python tutorial

Would you like to be able to write professional looking interactive Python tutorials that let you write and run programs in the browser?

Well, you can.

This post will show you how and I'll even provide a template that you can download for free.

Here's an example page. Play around with it - type new code into the editor and run it. Then carry on reading.

We will use a Python interpreter called, Skulp, that is written in Javascript. We don't need to download anything. All of the libraries that we will use are available on CDNs, so we just need to include the appropriate script and link tags.

If you go to the Skulpt web site you will see some examples of how to use it and very useful they are, too. however, I wanted to build something a little more professional-looking. So I constructed a web page that you can modify to produce an interactive tutorial like the one that, hopefully, you've just been looking at.

To build this, I use the Skulpt Python interpreter, the embedda…