本文翻译自:mkdir -p functionality in Python [duplicate]
This question already has an answer here: 这个问题在这里已有答案:
- How can I safely create a nested directory? 如何安全地创建嵌套目录? 25 answers 25个答案
Is there a way to get functionality similar to mkdir -p
on the shell from within Python. 有没有办法在Python中从shell获得类似于mkdir -p
功能。 I am looking for a solution other than a system call. 我正在寻找除系统调