problems using pythom tempfile module

samir.vds at samir.vds at
Sat Sep 15 23:11:39 CEST 2007

Hello everyone,

I'm trying to test the tempfile module with the following script,
which basically creates a temporary file, fills the file with some
test data and prints it.

import tempfile

t = tempfile.TemporaryFile()

Unfortunately, the print statement gives me an empty string. Can
somebody tell me what I'm doing wrong ?

regards Samir

More information about the Python-list mailing list