def get_working_dir():
 pwd_ = os.environ.get('PWD')
 cwd = os.getcwd()
 if (pwd_ is None):
  return cwd
 try:
  pwd_stat = os.stat(pwd_)
  cwd_stat = os.stat(cwd)
  if ((pwd_stat.ino == cwd_stat.ino) and (pwd_stat.dev == cwd_stat.dev)):
   return pwd_
 except Exception:
  pass
 return cwd

def get_working_dir ( ) : pwd_ = os . environ . get ( 'PWD' ) cwd = os . getcwd ( ) if ( pwd_ is None ) : return cwd try : pwd_stat = os . stat ( pwd_ ) cwd_stat = os . stat ( cwd ) if ( ( pwd_stat . ino == cwd_stat . ino ) and ( pwd_stat . dev == cwd_stat . dev ) ) : return pwd_ except Exception : pass return cwd
returns current path .