Greg Ewing wrote: > Gregory P. Smith wrote: >> I prefer the default of "clean up after itself" as is to avoid leaving >> temporary file turds on systems caused by us lazy programmers. > > Maybe instead of an option there should be a separate > function with a different name, such as NewUniqueFile. > For the use cases I have in mind, the file isn't really > "temporary" at all. Or rather, only the name is temporary, > as it ultimately gets renamed. >
I'm in favor of adding such a function. I've already wrote my way around this missing feature before. The tempfile modules AFAIK is the only portable way to make a unique filename and open it without exposing a race condition. As it is, it's not that difficult to write this function yourselves using mkstemp directly, but I believe there is a great benefit to have it in the stdlib. -Scott -- Scott Dial [EMAIL PROTECTED] [EMAIL PROTECTED] _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com