use correct string write function in Python API