➜

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.

作者 ysj.ray
收信人 ysj.ray
日期 2010-07-19.08:47:31
SpamBayes Score 0.0031152463
Marked as misclassified 否
Message-id <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za>
In-reply-to
内容
As discussed in python-dev mailing list, something should be add to os.mkdir() and os.makedirs() to simulate the shell's "mkdir -p" function, that is, suppress the OSError exception if the target directory exists. 

Here is a patch against py3k, with code, test and doc. I add an "ensure_exist" keyword argument for both os.mkdir() and os.makedirs(), indicates weather an OSError is raised if the target directory already exists.

Since I've no windows environment, I only tested the patch on Unix. Hope someone could help test it on windows.
历史
日期 用户 动作 参数
2010-07-19 08:47:35ysj.ray修改recipients: + ysj.ray
2010-07-19 08:47:35ysj.ray修改messageid: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za>
2010-07-19 08:47:33ysj.ray链接issue9299 messages
2010-07-19 08:47:33ysj.ray创建