Python Pit

A series of practical programming resources that quickly extend Python programming skills. Most of the exercises are designed to run on the Raspberry Pi computer.

Resources

Filter

Subject
Age
Type
Showing 10 result(s)

Gradient fills

This fully working Python project demonstrates a method of creating a gradient fill, to add depth to flat looking rectangles. It also shows how to use transparency effects to change the shape of gradient filled surfaces, how to plot points of a circle, and some examples of why you would want to do so. The activity...

Writing to files; creating a HTML page with Python

This resource includes two activities, demonstrating how to read and write to and from external text files. The first example shows how to use Python to create a html web page, which is then opened in a browser. The second program displays fading titles pulling data from an external text file, in this case a '...

Command line arguments

This full program code demonstrates how arguments can be passed to Python programs at the command line. The program dynamically generates graphics, and the user can change parameters for the graphics using command line arguments. Suggestions for additional challenges are also included.

Creating desktop widgets

Python can launch sub-processes that function separately. Using this approach it is possible to create any number of desktop widgets. This resource includes instructions to create two widgets: a simple RSS news reader and an image downloader for Astronomy Picture of the Day. Some additional Python modules must be...

Pages