Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

path

# Python program to change the
# current working directory
 
 
import os
 
# Function to Get the current
# working directory
def current_path():
    print("Current working directory before")
    print(os.getcwd())
    print()
 
 
# Driver's code
# Printing CWD before
current_path()
 
# Changing the CWD
os.chdir('../')
 
# Printing CWD after
current_path()
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #path
ADD COMMENT
Topic
Name
9+1 =