This is a system environment variable, so you can query its value from Python easily.
It is probably a bug in VTK library. Using OpenGL core profile causes rendering errors (e.g., render window update is delayed) on some computers with Intel graphics cards, so we had to force using OpenGL compatibility profile. However, apparently, this causes this issue on some high-end NVidia graphics cards.
Hopefully this problem will go away if we update to latest VTK version. Until then you may use this workaround of explicitly setting OpenGL profile.