为代码添加了注释

This commit is contained in:
MarkusJoe
2022-02-11 17:58:55 +08:00
parent a0f681048c
commit 9182597559
7 files changed
+32 -15

No files matched your search

+14
View File
@@ -4,3 +4,17 @@
# @Development Tool: PyCharm
# @Create Time: 2022/2/4
# @File Name: __init__.py.py
import os
if not os.path.exists('./db/count.db'):
print('未检测到数据库')
import sqlite3
conn = sqlite3.connect('./db/count.db', check_same_thread=False)
cursor = conn.cursor()
cursor.execute('create table ReqCount (name text primary key, times int)')
conn.commit()
cursor.close()
conn.close()
print('已在./db 目录下创建了count.db数据库')