现在装python基本都内置了sqlite连接,写成如下形式即可
from sqlite3 import dbapi2 as sqlite
如果需要insert或update东西,之后的cur必须commit;如果需要select,之后cur必须关闭,即cur.close(),否则容易出错。