Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python working directory

# Import the os module
import os

# Print the current working directory
print("Current working directory: {0}".format(os.getcwd()))

# Change the current working directory
os.chdir('/tmp')

# Print the current working directory
print("Current working directory: {0}".format(os.getcwd()))
Source by linuxize.com #
 
PREVIOUS NEXT
Tagged: #python #working #directory
ADD COMMENT
Topic
Name
3+9 =