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 folder.
A solution would be a keyword argument in `os.chdir` and `os.getcwd` that would
mimic the `-P` and `-L` arguments of `cd` and `pwd`, like:
os.chdir(logical=False) # or follow_symlinks=True maybe
os.getcwd(logical=False)
I don't know what should be the default values for these args, but at least
having an option to change the behavior would be nice.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue29635>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com