Answers for "python get parent directory of a specific file"

0

How do I get the parent directory in Python?

from pathlib import Path
Path(Path.cwd()).parent
Posted by: Guest on November-29-2020
4

python get parent directory

import os.path
os.path.dirname('C:Program Files')
Posted by: Guest on January-22-2020

Code answers related to "python get parent directory of a specific file"

Python Answers by Framework

Browse Popular Code Answers by Language