def _read_tmpfd(fil):
    """Read from a temporary file object

    Call this method only when nothing more will be written to the temporary
    file - i.e., all the writing has already been done.
    """
    fil.seek(0)
    return fil.read()