DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
get file parent directory python
from pathlib import Path path = Path("/here/your/path/file.txt") print(path.parent.absolute())
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#file
#parent
#directory
#python
ADD COMMENT
Topic
COMMENT
Name
6+5 =
Submit