def toStepDirectory(self, step): """ _toStepDirectory_ Switch current working directory to the step location within WMTaskSpace """ stepName = WMStepHelper(step).name() from WMTaskSpace import taskSpace stepSpace = taskSpace.stepSpace(stepName) os.chdir(stepSpace.location)