Python script to guess which ODBC Driver Manager is installed

286 Views Asked by At

I'm using distutils to distribute a python C extension library that requires to link against the ODBC Driver Manager available in the user's system (if any). For Windows is OK to assume that the system provided manager is the one to use. For other OSes, however, several driver mangers are available (mainly either iODBC or unixODBC).

Do you know a way to detect which of these is installed in the user OS so that the setup.py script can dynamically choose that one? It would ideally work for Mac and for mainstream Linux distros.

0

There are 0 best solutions below