标签:tab import 插入 success blog exec pytho class print
import sqlite3 from datetime import datetime conn = sqlite3.connect(‘data.db‘) print("Opened database successfully") for i in range(100): time = datetime.now() conn.execute("INSERT INTO test(time,url,imgPath) VALUES (?,?,?)", (time, "www.test.com", "c:/data/" + str(i))) conn.commit() conn.close()
标签:tab import 插入 success blog exec pytho class print
原文地址:http://www.cnblogs.com/verstin/p/6731083.html