Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
880 views
in Technique[技术] by (71.8m points)

directory - Python create dirs recursivly

How to create directories with python module os like

$ mkdir -p /some_non_exsitance_path/path
question from:https://stackoverflow.com/questions/65857679/python-create-dirs-recursivly

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is a method in the os module that allows you to create multiple folders

os.makedirs(r'/some_non_exsitance_path/path')

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...