cherico wrote:
from tempfile import *
f = NamedTemporaryFile ()
f = write ( 'test' )
print f.read () #here print nothing
Strange, it should raise an Exception.
I guess you typed it over?
'write' should give a NameError. You want to do f.write, not f=write.
After that, you first want to seek to 0.
Gerrit.
--
268. If any one hire an ox for threshing, the amount of the hire is
twenty ka of corn.
-- 1780 BC, Hammurabi, Code of Law
--
PrePEP: Builtin path type
http://people.nl.linux.org/~gerrit/c.../pep-xxxx.html
Asperger's Syndrome - a personal approach:
http://people.nl.linux.org/~gerrit/english/