Apr-17-2018, 09:05 AM
oops, that's one of mine,
here is is:
here is is:
from pathlib import Path class XMLpaths: def __init__(self): self.homepath = Path('.') self.rootpath = self.homepath / ('..') self.docpath = self.rootpath / 'doc' self.docpath.mkdir(exist_ok=True) self.datapath = self.rootpath / 'data' self.datapath.mkdir(exist_ok=True) self.xmlpath = self.datapath / 'xml' self.xmlpath.mkdir(exist_ok=True) if __name__ == '__main__': ''' running standalone once will create any missing directory, and will not harm any existing directories ''' XMLpaths()