from tempfile import * f = NamedTemporaryFile () f = write ( 'test' ) print f.read () #here print nothing why is it nothing to read()? I suppose f is of mode 'w+'