1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| import sqlite3
from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import tkinter as tk
import os
import configparser
import mysql.connector
class SelectDB:
def __init__(self, select_DB_form) :
self.host = tk.StringVar()
self.database = tk.StringVar()
Label(master, text="HOST:").grid(row=0)
Label(master, text="DATABASE:").grid(row=1)
e1 = Entry(master, textvariable=self.host)
e2 = Entry(master, textvariable=self.database)
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
Button (text = 'Create',command=self.start).grid (row = 5, column = 0)
def start(self):
print("OKKOKOKOK")
if __name__ == '__main__':
master = Tk()
application = SelectDB(master)
master.mainloop() |
Partager