import sqlite3
import socket
con4 = sqlite3.connect('backup.db')
cursor4 = con4.cursor()
l_ip=socket.gethostbyname(socket.gethostname())
l_ip = unicode(l_ip)
#print "DBBB>",('''INSERT INTO log(username, time, remote_ip, remote_path, local_path,local_ip,item)VALUES(?,?,?,?,?,?,?)''', (unicode(self.b_usr),unicode(time3),unicode(self.b_rip),unicode(self.b_src),unicode(self.b_des),unicode(l_ip),unicode(0)))
cursor4.execute('''INSERT INTO log(username, time, remote_ip, remote_path, local_path,local_ip,item)VALUES(?,?,?,?,?,?,?)''', ("a","b","c","d","e","f","g"))
con4.commit()
con4.close()