On 16 May 2015 at 20:04, Chris Barker <chris.bar...@noaa.gov> wrote: > I was referring to the SetDllDirectory API. I don't think that gets picked > up by other processes. > > from: > > https://msdn.microsoft.com/en-us/library/windows/desktop/ms686203%28v=vs.85%29.aspx > > It looks like you can add a path, at run time, that gets searched for dlls > before the rest of the system locations. And this does to effect any other > applications. But you'd need to make sure this got run before any of the > effected packages where loaded -- which is proabbly what David meant by > needing to "control the python binary".
Ah, sorry - I misunderstood you. This might work, but as you say, the DLL Path change would need to run before any imports needed it. Which basically means it needs to be part of the Python interpreter startup. It *could* be run as normal user code - you just have to ensure you run it before any imports that need shared libraries. But that seems very fragile to me. I'm not sure it's viable as a generic solution. Paul _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig