I googled a lot to find any python module to access TimesTen (in memory database). I am writing a automated testing framework (more like for System Test and not Unit Test).
There is pyodbc which is supposed to work on odbc databases. I'm not sure if it'll actually work. I think pyodbc requires odbc 3, and timesten might not support that (haven't checked), but it is worth checking out.
There is also mxODBC, which I have not tried. That might work as well.
Right, so here's an update since I tried it out: (Assuming you're on some sort of unix) It actually works with pyodbc together with unixodbc. pyodbc requires ODBC3.x and TimesTen don't support that. But, unixodbc will "translate" between the two for you. That means you can't use the timesten libodbc.so from pyodbc, since that is missing a bunch of functions from ODBC3.