def cwd(self): """Return process current working directory.""" # sometimes we get an empty string, in which case we turn # it into None return cext.proc_cwd(self.pid) or None