[Python-Dev] Why does python use relative instead of absolute path when calling LoadLibrary*

David Cournapeau cournape at gmail.com
Fri Mar 13 09:00:41 CET 2015


Thank you both for your answers.

I will go away with this modification, and see how it goes.

David

On Thu, Mar 12, 2015 at 2:41 AM, Wes Turner <wes.turner at gmail.com> wrote:

>
> On Mar 11, 2015 3:36 PM, "David Cournapeau" <cournape at gmail.com> wrote:
> >
> > Hi,
> >
> > While looking at the import code of python for C extensions, I was
> wondering why we pass a relative path instead of an absolute path to
> LoadLibraryEx (see bottom for some context).
> >
> > In python 2.7, the full path existence was even checked before calling
> into LoadLibraryEx (
> https://github.com/python/cpython/blob/2.7/Python/dynload_win.c#L189),
> but it looks like this check was removed in python 3.x branch.
> >
> > Is there any defined behaviour that depends on this path to be relative ?
>
> Just a guess: does it have to do with resolving symlinks (w/ POSIX
> filesystems)?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150313/d8eb13e9/attachment.html>


More information about the Python-Dev mailing list