[Python] What is the path of the loaded dll?

Discussão em 'Python' iniciado por Stack, Fevereiro 18, 2025.

  1. Stack

    Stack Membro Participativo

    I am loading a dll with ctypes under Cygwin with the following:

    import ctypes
    ctypes.cdll.LoadLibrary('foo.dll')


    How can I get the absolute path of my dll?

    The problem is that I have absolutely no clues where the dll is located. Can I relate on the following to get this information?

    subprocess.Popen(["which", lib], stdout=subprocess.PIPE).stdout.read().strip()

    Continue reading...

Compartilhe esta Página