July 20, 2010
1:51 p.m.
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