I need to pass environment variable value in script which in interpreted in embedded (in iOS app) Python interpreter. I know I can use setenv
before Py_Initialize
, but it would be available to all the 3rd-party libraries. Is there any possibility to set environment variable value for Python interpret only? Something like Py_SetEnvVar(char *name, char *value)
to make it available in python scripts:
os.environ.get('MY_ENV_VAR')