DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
django base path on level up
from pathlib import Path p = Path(__file__).parents[1] print(p) # /absolute/path/to/two/levels/up
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#django
#base
#path
#level
ADD COMMENT
Topic
COMMENT
Name
9+3 =
Submit