ctypes LoadLibrary search path

Santoso Wijaya santoso.wijaya at gmail.com
Fri Aug 5 17:18:04 EDT 2011

Nevermind. I figured it out (d'oh!).

I had to append to `os.environ['PATH']`, not `sys.path`!


On Fri, Aug 5, 2011 at 2:13 PM, Santoso Wijaya <santoso.wijaya at gmail.com>wrote:

> Hi,
> Can anyone enlighten me to the search path mechanism in ctypes'
> LoadLibrary? I have a DLL that resides elsewhere that is not in any default
> search path. I tried adding the path to `sys.path` before attempting to load
> said DLL but I still get "WindowsError: [Error 126] The specified module
> could not be found."
> Thanks,
> ~/santa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110805/e98e07c3/attachment.html>

More information about the Python-list mailing list