add support for writing python strings directly