Message 174885 - Python tracker (original) (raw)

Christian, Is there os.confstr supported by MaxOS X? Is there using of environ['PATH'] makes sense as good callback if former is not present?

About COMSPEC. From my point of view it's useful if we need default path. Or if we have Win9x, where shell is command.com (not supported by 3.4)

I guess to hardcode cmd.exe for Windows for the same reason as we hardcode sh for Unix systems.

I agree to moving code to os if we no need to use shutil.which. The function name is still the question: getdefaultshell, getshell, get_shell etc.

Adding shutil.getdefaultshell function is interesting suggestion. It function intended to return user shell (from SHELL env var or COMSPEC for Windows) and not used in subprocess if shell=True (but can be passed as executable param if need).