Lines Matching refs:cwd
76 def resolve(path, cwd, last_dir=None, debug=0, debug_out=sys.stderr): argument
91 return cwd
95 return cwd + path
96 if last_dir == cwd:
98 for d in [last_dir, cwd]:
141 def abspath(path, cwd, last_dir=None, debug=0, debug_out=sys.stderr): argument
146 rpath = resolve(path, cwd, last_dir, debug, debug_out)
325 self.cwd = os.getcwd() # make sure this is initialized
326 self.last_dir = self.cwd
452 cwd = self.last_dir = self.cwd
490 self.cwd = cwd = self.last_dir = w[1]
491 self.seenit(cwd) # ignore this
493 print("%s: CWD=%s" % (self.name, cwd), file=self.debug_out)
506 cwd = pid_cwd.get(pid, self.cwd)
507 self.last_dir = pid_last_dir.get(pid, self.cwd)
513 pid_cwd[npid] = cwd
514 pid_last_dir[npid] = cwd
518 cwd = abspath(w[2], cwd, None, self.debug, self.debug_out)
519 if not cwd:
520 cwd = w[2]
522 print("missing cwd=", cwd, file=self.debug_out)
523 if cwd.endswith('/.'):
524 cwd = cwd[0:-2]
525 self.last_dir = pid_last_dir[pid] = cwd
526 pid_cwd[pid] = cwd
528 print("cwd=", cwd, file=self.debug_out)
546 self.parse_path(w[2].strip("'"), cwd, 'R', w)
547 self.parse_path(w[3].strip("'"), cwd, 'W', w)
555 self.parse_path(path, cwd, w[0], w)
598 def parse_path(self, path, cwd, op=None, w=[]): argument
614 path = resolve(path, cwd, self.last_dir, self.debug, self.debug_out)
625 dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out)
637 if path in [self.last_dir, cwd, self.cwd, self.curdir]:
650 if dir == self.cwd or dir == self.curdir: