MCPcopy Create free account
hub / github.com/geekcomputers/Python / create_button

Function create_button

notepad/notepad_support.py:51–67  ·  view source on GitHub ↗

for creating a new database

(p1)

Source from the content-addressed store, hash-verified

49
50
51def create_button(p1):
52 """
53 for creating a new database
54 """
55 global cursor
56
57 sql_command = """
58 CREATE TABLE notes (
59 id INTEGER PRIMARY KEY,
60 title TEXT,
61 note TEXT);"""
62
63 try:
64 cursor.execute(sql_command)
65 w.errorOutput.configure(text="")
66 except:
67 w.errorOutput.configure(text="The database already exists")
68
69
70def add_button(p1):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected