This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author giampaolo.rodola
Recipients dallison, giampaolo.rodola
Date 2008-06-04.02:54:08
SpamBayes Score 0.4052217
Marked as misclassified No
Message-id <1212548058.42.0.367225581784.issue1390197@psf.upfronthosting.co.za>
In-reply-to
Content
If you mean "renaming the temporary file while it is still opened" I see
2 reasons for not doing that:

- On Windows this is not possible since files remains locked as long as
you close() them.

- open().name and tempfile.NamedTemporaryFile().name attributes are not
reliable since they remains the same even after the file renaming.
>>> import os
>>> f = open('1', 'w')
>>> os.rename('1', '2')
>>> f.name
1
History
Date User Action Args
2008-06-04 02:54:19giampaolo.rodolasetspambayes_score: 0.405222 -> 0.4052217
recipients: + giampaolo.rodola, dallison
2008-06-04 02:54:18giampaolo.rodolasetspambayes_score: 0.405222 -> 0.405222
messageid: <1212548058.42.0.367225581784.issue1390197@psf.upfronthosting.co.za>
2008-06-04 02:54:17giampaolo.rodolalinkissue1390197 messages
2008-06-04 02:54:15giampaolo.rodolacreate