title: Analog of `os.add_dll_directory` for Linux
body: <p>I am trying to load a <code>.so</code> library in Python using <code>ctypes</code>. This library has many files in <code>/home/me/my_library</code>. When I load</p>
  <pre><code>from ctypes import *
  lib = CDLL('/home/me/my_library/main.so')
  </code></pre>
  <p>I get</p>
  <pre><code>OSError: not_main.so: cannot open shared object file: No such file or directory
  </code></pre>
  <p>Note that the error is with <code>not_main.so</code> and not with <code>main.so</code>. All the files are within <code>/home/me/my_library</code>. I think the problem is that I have to add the path to this library, which in Windows can be done using <code>os.add_dll_directory</code>. How would I do this in Linux? Is there a cross-platform way of doing this?</p>
  <p><strong>Note</strong> I have tried with <code>os.environ['LD_LIBRARY_PATH'] = '/home/me/my_library/'</code> but it does not work.</p>