STINNER Victor <vstin...@redhat.com> added the comment:
man get_current_dir_name(): get_current_dir_name() will malloc(3) an array big enough to hold the absolute pathname of the current working directory. If the environment variable PWD is set, and its value is correct, then that value will be returned. The caller should free(3) the returned buffer. Oh sorry, I missed that part. In this case, we should expose os.get_current_dir_name() using this function. But it's a glibc extension: Feature Test Macro Requirements for glibc (see feature_test_macros(7)): get_current_dir_name(): _GNU_SOURCE I'm not sure about adding shutil.get_current_dir_name() which would use os.get_current_dir_name(), or reimplement it in pure Python. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue1154351> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com