'write a string to the original file descriptor'

def writeorg(self, data):

    tempfp = tempfile.TemporaryFile()
    try:
        os.dup2(self._savefd, tempfp.fileno())
        tempfp.write(data)
    finally:
        tempfp.close()
