Christian Theune <[EMAIL PROTECTED]> schreibt: >Nope this is not the correct simulation. Who except your application >knows about /tmp/asdf? You have to simulate deleting d.name and then >you'll see that /tmp/asdf does not disappear.
Ok, but what Dieter means is that the tmp dir as a whole is emptied from time to time. I see your point that closing a temp file removes it whereas the link still works, but that does not solve the problem that system administrators may sweep things out. The following solution avoids this problem: >>> os.mkdir('/Users/uo/blobs') >>> d = tempfile.NamedTemporaryFile() >>> d.write('Test') >>> d.flush() >>> os.rename(d.name, '/Users/uo/blobs/asdf') >>> open('/Users/uo/blobs/asdf').read() 'Test' >>> os.path.exists('/tmp/asdf') False Uwe ________________________________________________________________ Dr. Uwe Oestermeier Institut für Wissensmedien Knowledge Media Research Center Konrad-Adenauer-Str. 40 D-72072 Tuebingen Germany [EMAIL PROTECTED] Tel. +49 7071 979-208 Fax +49 7071 979-100 _______________________________________________ Zope3-dev mailing list Zope3email@example.com Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com