◐ Shell
clean mode source ↗

Message 174930 - Python tracker

I've tested confstr("CS_PATH") on Linux, Mac OS X, Solaris, HP-UX and BSD. It works and the path to `sh` is always included.

Taras:
You don't have to perform the platform inside the get_shell() function. I suggest that you define the function depending on the value of `name`.

if name == "posix":
    def get_shell():
        ...
elif name in {"nt", "ce"}:
    def get_shell():
        ...