pathlib.mkidr()
p=pathlib.Path(__file__) print("*"*180) print(p.cwd()) print(p.cwd().joinpath("my/directory/somelog")) pathlib.Path(p.cwd().joinpath("my/directory/somelog")).mkdir(parents=True, exist_ok=True)