'Directory that the process is working in.
Example:
>>> p = process(\'sh\')
>>> p.sendline(\'cd /tmp; echo AAA\')
>>> _ = p.recvuntil(\'AAA\')
>>> p.cwd == \'/tmp\'
True
>>> p.sendline(\'cd /proc; echo BBB;\')
>>> _ = p.recvuntil(\'BBB\')
>>> p.cwd
\'/proc\''

@property
def cwd(self):

    try:
        self._cwd = os.readlink(('/proc/%i/cwd' % self.pid))
    except Exception:
        pass
    return self._cwd
