You can use the Python os module to send commands out to the operating system. Through os you can do anything from changing the current working directory through to listing the contents of a directory.
import os # print the current working directory print os.getcwd() # change the working directory os.chdir("..") # create a new directory os.mkdir("new_folder") # list the contents of a directory os.listdir("new_folder") # remove directory os.rmdir("new_folder") # remove a file os.remove("image.jpg") # rename a file/directory and where it will go os.rename("/data/jack", "/james")