title: Python ctypes: loading DLL from from a relative path
body: <p>I have a Python module, <code>wrapper.py</code>, that wraps a C DLL. The DLL lies in the same folder as the module. Therefore, I use the following code to load it:</p>
  
  <pre><code>myDll = ctypes.CDLL("MyCDLL.dll")
  </code></pre>
  
  <p>This works if I execute <code>wrapper.py</code> from its own folder. If, however, I run it from elsewhere, it fails. That's because ctypes computes the path relative to the current working directory.</p>
  
  <p>My question is, is there a way by which I can specify the DLL's path relative to the wrapper instead of the current working directory? That will enable me to ship the two together and allow the user to run/import the wrapper from anywhere.</p>