Fabien Dubosson added the comment:
> I'm going to close this issue.
I was doing to do so, here was my message:
> See shells sources. According to the manpage `pwd -L` just uses PWD from
> environment.
I looked directly at `pwd
Fabien Dubosson added the comment:
> Most os functions are thin wrappers around system calls. There is no system
> call that works as 'cd' without '-P'.
I would like to believe in this, but then if `cd` is some bash internal, how
does `/usr/bin/pwd -L` find it back?
Fabien Dubosson added the comment:
Thanks for the additional information!
> The 'cd' man page says that 'cd -P' should "perform actions equivalent to the
> chdir() function".
Just wondering, do you know what is the function called by `cd`/`cd -L` then?
It
Fabien Dubosson added the comment:
The previous example (sorry, first time using this platform, I'm a little bit
messy here), shows that `os.chdir` resolves symlinks by default, as opposed to
what `cd` does in bash. This means it is not possible to change the directory
to a symlink folde
New submission from Fabien Dubosson:
When using bash, the `cd` function does not follow symlinks by default, but `cd
-P` does. The `os.chdir` function behaves like `cd -P` preventing to be able to
change directory to a symlink folder.
Initial setup (make a `/tmp/to/dst` symlink pointing to
Changes by Fabien Dubosson :
--
components: Interpreter Core
nosy: StreakyCobra
priority: normal
severity: normal
status: open
title: os.chdir() acts like `cd -P` by default, it should offer an option to
not follow symlinks
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4