Untitled
unknown
plain_text
a year ago
510 B
4
Indexable
import sqlite3 import sys import os def get_base_path(): if getattr(sys, 'frozen', False): return os.path.dirname(sys.executable) else: return os.path.dirname(__file__) database_path = os.path.join(get_base_path(), 'agiliza.db') conn = sqlite3.connect(database_path) cursor = conn.cursor() cursor.execute(''' CREATE TABLE IF NOT EXISTS usuarios ( id INTEGER PRIMARY KEY, nome TEXT NOT NULL, senha TEXT NOT NULL ); ''') conn.commit() conn.close()
Editor is loading...
Leave a Comment