/ Published in: Python
![](/img/icon_sav.png?v3)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def ensure_dir(f): d = os.path.dirname(f) if not os.path.exists(d): os.makedirs(d)
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)
def ensure_dir(f): d = os.path.dirname(f) if not os.path.exists(d): os.makedirs(d)