Thank you for reaching out to us. I am a bit confused here. First of all,
subprocess.call are supported by our interpreter; we use them in internal toolchains ourselves. You then say:
to call some cmd programms like a brew, node, npm etc. But Cinema 4D can't recognize this commands.
But it is not Cinema 4D nor Python which is failing, but your OS because in the context of
DIRNAME the symbol
brew seems to have no meaning on your machine. I would not put much value on setting the working directory to the executed file, it is more important to pass
shell=True so that
subprocess.Popen tries to match the environment of a shell. I can for example run Python from Cinema 4D here. I do not even need
shell for that here, because I have set up
py as a global symbol:
The main question is: On which OS are you? I assume you are on macOS and want to run Homebrew? Are you sure that
brew is an environment variable and not just a symbolic link in
/usr/local/bin/? If so, you must make that directory the working directory. Otherwise
shell=True should help. You could also use
Helping you to set up your environment variables or symbolic links in such manner that they work in the Python of Cinema 4D beyond what I have provided here is unfortunately out of scope of support.