From looking at the sample output of distmat it looks like a - hopefully - tab separated format, so it is maybe not required to use biopython. I guess what you could do is
skip the few header lines
use string split using "t" on each line and read this into a vector or array data structure. Names seem to be the last column in each line.
From the example output though it could also be a format which uses variable number of space spaces to align the ouput columns, this would make things slightly more difficult but not impossible. In this case, you had to split by "s+" (multiple spaces) and fill up each row vector with #n undefined values, according to the #n the line number (starting at 0).
As you might have noticed, I don't know python, but I'm sure it has something like a split and arrays (as people still claim it is nearly as powerful as perl xD). If that doesn't seem to help, ignore this answer or ask me for a perl script.
Thanks Michael. I had similar thoughts just throughout I would check if there is an existing way...