更新数据库名称

This commit is contained in:
MarkusJoe
2022-02-16 16:24:44 +08:00
parent 08c6ab3d64
commit 7dda0c747e
10 files changed
+180 -130

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
import sys
print(sys.argv)
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env python3
# -- coding:utf-8 --
# @Author: markushammered@gmail.com
# @Development Tool: PyCharm
# @Create Time: 2022/2/16
# @File Name: connectdb.py
import sqlite3
def exec(cmd):
try:
conn = sqlite3.connect('../../db/count.db')
cursor = conn.cursor()
cursor.execute(cmd)
return cursor.fetchall()
finally:
cursor.close()
conn.close()
if __name__ == '__main__':
while True:
cmd = input('>>>')
print(exec(cmd))
+1 -1
View File
@@ -4,7 +4,7 @@ import os
import sqlite3
conn = sqlite3.connect('../assets/theme.db')
conn = sqlite3.connect('../../db/theme.db')
cursor = conn.cursor()
file_list = os.listdir('../assets/themes/')
+4 -3
View File
@@ -10,8 +10,7 @@ import random
import base64
import sqlite3
conn = sqlite3.connect('../assets/theme.db')
conn = sqlite3.connect('../../db/style.db')
cursor = conn.cursor()
@@ -30,4 +29,6 @@ def get_all_theme():
fp.write(img_data)
# if i[1] == '':
# print(n)
get_all_theme()
get_all_theme()