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
491 self.cwd = cwd = self.last_dir = w[1]
492 self.seenit(cwd) # ignore this
494 print("%s: CWD=%s" % (self.name, cwd), file=self.debug_out)
524 cwd = pid_cwd.get(pid, self.cwd)
525 self.last_dir = pid_last_dir.get(pid, self.cwd)
531 pid_cwd[npid] = cwd
532 pid_last_dir[npid] = cwd
536 cwd = abspath(w[2], cwd, None, self.debug, self.debug_out)
537 if not cwd:
538 cwd = w[2]
540 print("missing cwd=", cwd, file=self.debug_out)
541 if cwd.endswith('/.'):
542 cwd = cwd[0:-2]
543 self.last_dir = pid_last_dir[pid] = cwd
544 pid_cwd[pid] = cwd
546 print("cwd=", cwd, file=self.debug_out)
564 self.parse_path(w[3].strip("'"), cwd, 'W', w)
565 self.parse_path(w[2].strip("'"), cwd, 'R', w)
573 self.parse_path(path, cwd, w[0], w)
616 def parse_path(self, path, cwd, op=None, w=[]): argument
632 npath = resolve(path, cwd, self.last_dir, self.debug, self.debug_out)
641 npath = resolve(path, cwd, dir, self.debug, self.debug_out)
653 dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out)
666 if path in [self.last_dir, cwd, self.cwd, self.curdir]:
679 if dir == self.cwd or dir == self.curdir: