Skip to content

Instantly share code, notes, and snippets.

@Dwiga
Created May 3, 2017 15:36
Show Gist options
  • Save Dwiga/db20daa6c31b3a8114fe586c47937f16 to your computer and use it in GitHub Desktop.
Save Dwiga/db20daa6c31b3a8114fe586c47937f16 to your computer and use it in GitHub Desktop.
import tkinter
from tkinter import *
from sqlite import con, exe
con = con
exe = exe
import datetime
head = tkinter.Tk()
Label(ndas, text="Title").grid(row=0)
Label(ndas, text="Date").grid(row=1)
def sve():
exe.execute("insert into nameoftable (title, date) values (?,?)", (e1.get(), e2.get()))
con.commit()
e1 = Entry(ndas)
e2 = Entry(ndas)
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
Button(ndas, text='Save', command=sve).grid(row=9, column=1, sticky=W, pady=4)
mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment