Billy has written an Instructable in which he explains how to calculate Pi in various ways before writing a method in Python code to do it. The result is then printed out on a thermal printer from Adafruit. The whole thing is controlled via buttons through the GPIO. Read the tutorial here and see it working below: