On Tue, 20 Jul 2010, Steven D'Aprano wrote:
I tend to agree. Perhaps all we need is a recipe in the docs:try: os.makedirs(path) except OSError, e: if e.errno != 17: raise
What if the path or a parent of it already exists as a file? If one has requested -p I believe one typically wants this to be an error. And I assume that one would not use the literal 17 in production code.
Isaac Morland CSCF Web Guru DC 2554C, x36650 WWW Software Specialist _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
