First stab at making a writer in Python