Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python how to change back to the later directory

import os
#just write the whole file path in the change directory function
os.chdir('C:User/.../the_name_of_the_directory')
#Just fo check
os.getcwd()
Comment

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())
Comment

PREVIOUS NEXT
Code Example
Python :: if condition dataframe python 
Python :: precision and recall from confusion matrix python 
Python :: pandas read excel certain columns 
Python :: openpyxl read cell value 
Python :: how to update values in tkinter 
Python :: inser elemts into a set in python 
Python :: python get 2d array output as matrix 
Python :: numpy linspace of dates 
Python :: python if statement 
Python :: python funtion 
Python :: django convert object to dict 
Python :: pathlib path forward or back slahses 
Python :: sentence transformers 
Python :: python open directory and read files 
Python :: how to install python in ubuntu 
Python :: python dictionary sort by value then alphabetically 
Python :: how to merge two dictionaries with same keys in python 
Python :: how to username in python? 
Python :: taille du liste python 
Python :: python if string contains char 
Python :: hash with python 
Python :: check if string equals string in list python 
Python :: win64pyinstaller 
Python :: form action in django 
Python :: How to count a specific number in a python list? 
Python :: python find string count in str 
Python :: Reverse an string Using Stack in Python 
Python :: output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()] IndexError: invalid index to scalar variable. 
Python :: keras model compile 
Python :: send serial commands in python 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =