Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Change my 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: #Change #python #working #directory
ADD COMMENT
Topic
Name
8+6 =