On 6 September 2013 13:21, Tim Golden <m...@timgolden.me.uk> wrote: > True, but then you're into determining a temporary name somewhere on the > same volume if possible and avoiding collisions etc. Again, I don't > think this is something we need to be doing by default in core Python.
Agreed. There simply is no solution that works in all cases. If you rename the file to anywhere but the same directory, you potentially have permission issues. And if you rename to the same directory, you still can't delete the directory. It's a shame, because a helper to do this would be useful for Unix users wanting to ensure that their code works properly on Windows, but there really isn't an answer other than knowing how things work (and crafting an appropriate solution for your application), here... Paul _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com