I\'m working with pythran, a Python to c++ compiler http://pythran.readthedocs.io/
In its manual page, pythran says it supports the method write from TextIOWrapper