Using the code below leaves me with an open connection, how do I close?
import pyodbc conn = pyodbc.connect(\'DRIVER=MySQL ODBC 5.1 driver;SERVER=localhost;D
You might try turning off pooling, which is enabled by default. See this discussion for more information.
import pyodbc pyodbc.pooling = False conn = pyodbc.connect('DRIVER=MySQL ODBC 5.1 driver;SERVER=localhost;DATABASE=spt;UID=who;PWD=testest') csr = conn.cursor() csr.close() del csr