Is there a way to make a python module load a dll in my application directory rather than the version that came with the python installation, without making changes to the python installation (which would then require I made an installer, and be careful I didn't break other apps for people by overwrting python modules and changing dll versions globaly...)?
Specifically I would like python to use my version of the sqlite3.dll, rather than the version that came with python (which is older and doesn't appear to have the fts3 module).
Retrieving python module path
Python: using a recursive algorithm as a generator
sys.pathshould be fine.
I need a really good reason to use Python
However, if you're talking about DLLs linked against those DLLs; i.e.
Virtualenv on Ubuntu with no site-packages
foo.pyddepends on, then you need to modify your PATH environment variable.
Translate SVN path to local file system path in Python
I wrote about doing this for PyGTK a while ago, but in your case I think it should be as simple as:.
How can I add post-install scripts to easy_install / setuptools / distutils?
That will insert
import os os.environ['PATH'] = 'my-app-dir' + ';' + os.environ['PATH']
my-app-dirat the head of your Windows path, which I believe also controls the load-order for DLLs..
How to scp in python?
Keep in mind that you will need to do this before loading the DLL in question, i.e., before importing anything interesting..
Truncate a string without ending in the middle of a word
sqlite3 may be a bit of a special case, though, since it is distributed with Python; it's obviously kind of tricky to test this quickly, so I haven't checked
So you can either put it in the current directory or change the
PYTHONPATHenvironment variable to do that..