python set working directory from command line code example
Example 1: setwd python
os.chdir("/home/varun/temp")
Example 2: python set cwd to script directory
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
os.chdir("/home/varun/temp")
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)