loading-environment-modules-within-a-python-script
Loading environment modules within a python script The above solution behaves differently in the python interactive shell and within an executable python file & I need some help in understanding how to get it to work in the exe.py setting, where import statements appear not to be seeing the environment variable PYTHONPATH. In python shell the solution allows loading of an environment module which modifies PYTHONPATH; I can subsequently import a python module from that amended PYTHONPATH. This is great functionality & exactly what I want it to do in an executable python script. In a python