Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to go to previous directory in os python

print(os. getcwd())
path_parent = os. path. dirname(os. getcwd())
os. chdir(path_parent)
print(os. getcwd())
 
PREVIOUS NEXT
Tagged: #previous #directory #os #python
ADD COMMENT
Topic
Name
6+2 =