导包
import sqlite3, os
import urllib.request, urllib.parse, urllib.error
import ssl
import json
# 连接到SQLite数据库
# 数据库文件是 py.db
# 如果文件不存在,那么会自动在当前目录创建一个数据库文件:
conn = sqlite3.connect('py.db')
# db_file = os.path.join(os.path.dirname(__file__), 'py.db')
# if os.path.isfile(db_file):
# os.remove(db_file)
# conn = sqlite3.connect(db_file)
# 创建一个Cursor:
cursor = conn.cursor()
# 执行一条SQL语句,创建user表:
# cursor.execute('create table COMPANY (编号 int primary key, 玩家1 TEXT , 得分1 int , 玩家2 TEXT , 得分2 int)');
# 继续执行一条SQL语句,插入一条记录:
#