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 pitrou
Recipients ncoghlan, pitrou
Date 2013-04-09.10:19:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za>
In-reply-to
Content
It is sometimes useful to create a temporary file as a copy of an existing file (especially e.g. in tests, when you want to mutate the temp file but not the original). I would suggest adding a `copy_from` argument to TemporaryFile and NamedTemporaryFile, which is either the path to an existing file or a file-like object. Then the contents of that source file are copied to the tempfile before it is yielded.
History
Date User Action Args
2013-04-09 10:19:58pitrousetrecipients: + pitrou, ncoghlan
2013-04-09 10:19:58pitrousetmessageid: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za>
2013-04-09 10:19:58pitroulinkissue17673 messages
2013-04-09 10:19:58pitroucreate