def getdirs():
 dirs = [i for i in os.listdir(dname)]
 dirs = filter((lambda x: (not os.path.isfile(os.path.join(dname, x)))), dirs)
 return dirs

def getdirs ( ) : dirs = [ i for i in os . listdir ( dname ) ] dirs = filter ( ( lambda x : ( not os . path . isfile ( os . path . join ( dname , x ) ) ) ) , dirs ) return dirs
get current directories of cwd in order to restore to this .