Introducing Python programming to a general audience

I delivered a talk at the online Tech me out at home event organised by Pint of Science Ireland on May 27, 2020. It was my attempt at introducing Python programming to a general audience.


Overall, I’m happy with the way it went, especially with the fact that I could include code samples within the presentation and run them along with the audience (example slide). You can read more about it in the technical details section below, if you are interested.

After the talk, there were some interesting questions from the audience, like:

  • Why use Python instead of Java?
  • What program to use for editing Python code? etc.,

I recommended Mu as the code editor for beginners. It is what I use for my own course.

Technical details

For the online presentation, I used reveal.js. To embed code samples within the presentation I used Trinket.

Other programs and services with similar functionality:

Skulpt is open source and can be configured to run in Python 3 mode. I haven’t tested this yet.

CodeSkulptor is based on Skulpt and has Python 3 support. There was no option to immediately embed it in HTML. I noticed later that it is possible to generate a New URL for each example. This URL can then be embedded in an iframe similar to Trinket.‘s interface is nice and has support for Python 3 but code can only be shared with a limited number of participants in the free version. From their website, it appears this limit has been raised temporarily to 50 due to Covid-19.

Integrating presentation on website

These are the steps I used to integrate the reveal.js presentation on this website, which is built using the Pelican static site generator:

  1. Copy slides to a new directory under content so the final path would be content/slides/pint20. Here is a zip file (4.2 MB) of my presentation if you would like to test.

  2. Add slides directory to STATIC_PATHS:

    STATIC_PATHS = ["files", "images", "slides"]
  3. Ask Pelican to ignore processing HTML files in the slides directory. I only use Markdown for writing content, so this setting does not create any problems for me:

    READERS = {"html": None}

When Pelican regenerates the website, the presentation should now be copied over to the output directory output/slides/pint20.

A better approach might be to create a Pelican template. I will update this post if I managed to do that.


If you have any comments on this post, you can leave them on Mastodon or send me an email.