Sublime Forum

Set Environment Variable for plugin_host

#1

Hello,

I am writing a plugin that loads up a particularly poorly-written 3rd-party Python module that relies on the value of an Environment Variable to function properly (in particular, DYLD_LIBRARY_PATH).

Of course, I could set this globally, but I would love for the Sublime Plugin to be self-contained. I notice that plugins run in a child process of Sublime itself - is there any way to tell Sublime to provide the plugin_host process with a particular Environment Variable before it spins it off?

If not, does anyone know of another way to solve this problem? I would greatly prefer to have the python script be self-contained, rather than calling out to an external script that utilizes the library. Thank you.

0 Likes