Software Carpentry Day 11: Binary Data and Web Client Programming

Morning: Binary Data

Write a function that stores the information about a molecule in a PDB file in a binary format. (You can find the specification of PDB files in Day 10's exercises.) Write another function that can read one of your files. For bonus marks, extend your functions so that a single file can contain any number of molecules.

Afternoon: Web Client Programming

The URL for Greg Wilson's personal blog is http://pyre.third-bit.com/blog/feed. Using urllib and either regular expressions or the xml.dom.minidom library, write a program that will read RSS from this URL and print out a list of blog item titles, publication dates, and URLs.

Grab pages from the Weather Network and extract the temperature (look for <div id="obs_currtemp">). The URL for Edmonton is http://www.theweathernetwork.com/weather/CAAB0103 and for Toronto is http://www.theweathernetwork.com/weather/caon0696.