What makes you choose print>>self._fp or self._fp.write? I think the usage should be consistent, just choose one.