ENH: Better parallel port handling

I think this does something like what we discussed @peircej. Note I also included a few PEP8 style changes.