Here is a great document that talks about how to go around using the Operating System:
http://www.freenetpages.co.uk/hp/alan.gauld/tutos.htm
If we want to do we know what the current directory is? And can we change it? Of course we can - by using the os module!
Code: Select all
import os
print os.getcwd() #cwd=current working directory
os.chdir("C:/WINDOWS")
print os.getcwd()
print os.listdir('.') # finally get listing of cwd