Python example code for "Bitcoins the hard way: Using the raw Bitcoin protocol"