from tkinter import *
from sudoku import *

#if __name__ == "__main__":

window = Tk()
window.title('My Window')
window.geometry('187x220')
canvas = Canvas()

entry1 = Text(window, height=1, width=2)
entry1.insert(END, "8")
entry2 = Text(window, height=1, width=2)
entry2.insert(END, "1")
entry3 = Text(window, height=1, width=2)
entry3.insert(END, "5")
entry4 = Text(window, height=1, width=2)
entry4.insert(END, "9")
entry5 = Text(window, height=1, width=2)
entry5.insert(END, "6")
entry6 = Text(window, height=1, width=2)
entry6.insert(END, "2")
entry7 = Text(window, height=1, width=2)
entry7.insert(END, "7")
entry8 = Text(window, height=1, width=2)
entry8.insert(END, "3")
entry9 = Text(window, height=1, width=2)
entry9.insert(END, "4")

entry10 = Text(window, height=1, width=2)
entry10.insert(END, "7")
entry11 = Text(window, height=1, width=2)
entry11.insert(END, "2")
entry12 = Text(window, height=1, width=2)
entry12.insert(END, "4")
entry13 = Text(window, height=1, width=2)
entry13.insert(END, "3")
entry14 = Text(window, height=1, width=2)
entry14.insert(END, "8")
entry15 = Text(window, height=1, width=2)
entry15.insert(END, "5")
entry16 = Text(window, height=1, width=2)
entry16.insert(END, "1")
entry17 = Text(window, height=1, width=2)
entry17.insert(END, "9")
entry18 = Text(window, height=1, width=2)
entry18.insert(END, "6")

entry19 = Text(window, height=1, width=2)
entry19.insert(END, "6")
entry20 = Text(window, height=1, width=2)
entry20.insert(END, "9")
entry21 = Text(window, height=1, width=2)
entry21.insert(END, "3")
entry22 = Text(window, height=1, width=2)
entry22.insert(END, "4")
entry23 = Text(window, height=1, width=2)
entry23.insert(END, "1")
entry24 = Text(window, height=1, width=2)
entry24.insert(END, "7")
entry25 = Text(window, height=1, width=2)
entry25.insert(END, "8")
entry26 = Text(window, height=1, width=2)
entry26.insert(END, "5")
entry27 = Text(window, height=1, width=2)
entry27.insert(END, "2")

entry28 = Text(window, height=1, width=2)
entry28.insert(END, "4")
entry29 = Text(window, height=1, width=2)
entry29.insert(END, "3")
entry30 = Text(window, height=1, width=2)
entry30.insert(END, "8")
entry31 = Text(window, height=1, width=2)
entry31.insert(END, "5")
entry32 = Text(window, height=1, width=2)
entry32.insert(END, "7")
entry33 = Text(window, height=1, width=2)
entry33.insert(END, "1")
entry34 = Text(window, height=1, width=2)
entry34.insert(END, "6")
entry35 = Text(window, height=1, width=2)
entry35.insert(END, "2")
entry36 = Text(window, height=1, width=2)
entry36.insert(END, "9")

entry37 = Text(window, height=1, width=2)
entry37.insert(END, "9")
entry38 = Text(window, height=1, width=2)
entry38.insert(END, "5")
entry39 = Text(window, height=1, width=2)
entry39.insert(END, "2")
entry40 = Text(window, height=1, width=2)
entry40.insert(END, "8")
entry41 = Text(window, height=1, width=2)
entry41.insert(END, "3")
entry42 = Text(window, height=1, width=2)
entry42.insert(END, "6")
entry43 = Text(window, height=1, width=2)
entry43.insert(END, "4")
entry44 = Text(window, height=1, width=2)
entry44.insert(END, "7")
entry45 = Text(window, height=1, width=2)
entry45.insert(END, "1")

entry46 = Text(window, height=1, width=2)
entry46.insert(END, "1")
entry47 = Text(window, height=1, width=2)
entry47.insert(END, "7")
entry48 = Text(window, height=1, width=2)
entry48.insert(END, "6")
entry49 = Text(window, height=1, width=2)
entry49.insert(END, "2")
entry50 = Text(window, height=1, width=2)
entry50.insert(END, "4")
entry51 = Text(window, height=1, width=2)
entry51.insert(END, "9")
entry52 = Text(window, height=1, width=2)
entry52.insert(END, "3")
entry53 = Text(window, height=1, width=2)
entry53.insert(END, "8")
entry54 = Text(window, height=1, width=2)
entry54.insert(END, "5")

entry55 = Text(window, height=1, width=2)
entry55.insert(END, "3")
entry56 = Text(window, height=1, width=2)
entry56.insert(END, "6")
entry57 = Text(window, height=1, width=2)
entry57.insert(END, "9")
entry58 = Text(window, height=1, width=2)
entry58.insert(END, "1")
entry59 = Text(window, height=1, width=2)
entry59.insert(END, "5")
entry60 = Text(window, height=1, width=2)
entry60.insert(END, "8")
entry61 = Text(window, height=1, width=2)
entry61.insert(END, "2")
entry62 = Text(window, height=1, width=2)
entry62.insert(END, "4")
entry63 = Text(window, height=1, width=2)
entry63.insert(END, "7")

entry64 = Text(window, height=1, width=2)
entry64.insert(END, "2")
entry65 = Text(window, height=1, width=2)
entry65.insert(END, "4")
entry66 = Text(window, height=1, width=2)
entry66.insert(END, "7")
entry67 = Text(window, height=1, width=2)
entry67.insert(END, "6")
entry68 = Text(window, height=1, width=2)
entry68.insert(END, "9")
entry69 = Text(window, height=1, width=2)
entry69.insert(END, "3")
entry70 = Text(window, height=1, width=2)
entry70.insert(END, "5")
entry71 = Text(window, height=1, width=2)
entry71.insert(END, "1")
entry72 = Text(window, height=1, width=2)
entry72.insert(END, "8")

entry73 = Text(window, height=1, width=2)
entry73.insert(END, "5")
entry74 = Text(window, height=1, width=2)
entry74.insert(END, "8")
entry75 = Text(window, height=1, width=2)
entry75.insert(END, "1")
entry76 = Text(window, height=1, width=2)
entry76.insert(END, "7")
entry77 = Text(window, height=1, width=2)
entry77.insert(END, "2")
entry78 = Text(window, height=1, width=2)
entry78.insert(END, "4")
entry79 = Text(window, height=1, width=2)
entry79.insert(END, "9")
entry80 = Text(window, height=1, width=2)
entry80.insert(END, "6")
entry81 = Text(window, height=1, width=2)
entry81.insert(END, "3")


entry1.pack()
entry1.place(x=1, y=1, in_= window)
entry2.pack()
entry2.place(x=21, y=1, in_= window)
entry3.pack()
entry3.place(x=41, y=1, in_= window)
entry4.pack()
entry4.place(x=64, y=1, in_= window)
entry5.pack()
entry5.place(x=84, y=1, in_= window)
entry6.pack()
entry6.place(x=104, y=1, in_= window)
entry7.pack()
entry7.place(x=127, y=1, in_= window)
entry8.pack()
entry8.place(x=147, y=1, in_= window)
entry9.pack()
entry9.place(x=167, y=1, in_= window)

entry10.pack()
entry10.place(x=1, y=21, in_= window)
entry11.pack()
entry11.place(x=21, y=21, in_= window)
entry12.pack()
entry12.place(x=41, y=21, in_= window)
entry13.pack()
entry13.place(x=64, y=21, in_= window)
entry14.pack()
entry14.place(x=84, y=21, in_= window)
entry15.pack()
entry15.place(x=104, y=21, in_= window)
entry16.pack()
entry16.place(x=127, y=21, in_= window)
entry17.pack()
entry17.place(x=147, y=21, in_= window)
entry18.pack()
entry18.place(x=167, y=21, in_= window)

entry19.pack()
entry19.place(x=1, y=41, in_= window)
entry20.pack()
entry20.place(x=21, y=41, in_= window)
entry21.pack()
entry21.place(x=41, y=41, in_= window)
entry22.pack()
entry22.place(x=64, y=41, in_= window)
entry23.pack()
entry23.place(x=84, y=41, in_= window)
entry24.pack()
entry24.place(x=104, y=41, in_= window)
entry25.pack()
entry25.place(x=127, y=41, in_= window)
entry26.pack()
entry26.place(x=147, y=41, in_= window)
entry27.pack()
entry27.place(x=167, y=41, in_= window)

entry28.pack()
entry28.place(x=1, y=64, in_= window)
entry29.pack()
entry29.place(x=21, y=64, in_= window)
entry30.pack()
entry30.place(x=41, y=64, in_= window)
entry31.pack()
entry31.place(x=64, y=64, in_= window)
entry32.pack()
entry32.place(x=84, y=64, in_= window)
entry33.pack()
entry33.place(x=104, y=64, in_= window)
entry34.pack()
entry34.place(x=127, y=64, in_= window)
entry35.pack()
entry35.place(x=147, y=64, in_= window)
entry36.pack()
entry36.place(x=167, y=64, in_= window)

entry37.pack()
entry37.place(x=1, y=84, in_= window)
entry38.pack()
entry38.place(x=21, y=84, in_= window)
entry39.pack()
entry39.place(x=41, y=84, in_= window)
entry40.pack()
entry40.place(x=64, y=84, in_= window)
entry41.pack()
entry41.place(x=84, y=84, in_= window)
entry42.pack()
entry42.place(x=104, y=84, in_= window)
entry43.pack()
entry43.place(x=127, y=84, in_= window)
entry44.pack()
entry44.place(x=147, y=84, in_= window)
entry45.pack()
entry45.place(x=167, y=84, in_= window)

entry46.pack()
entry46.place(x=1, y=104, in_= window)
entry47.pack()
entry47.place(x=21, y=104, in_= window)
entry48.pack()
entry48.place(x=41, y=104, in_= window)
entry49.pack()
entry49.place(x=64, y=104, in_= window)
entry50.pack()
entry50.place(x=84, y=104, in_= window)
entry51.pack()
entry51.place(x=104, y=104, in_= window)
entry52.pack()
entry52.place(x=127, y=104, in_= window)
entry53.pack()
entry53.place(x=147, y=104, in_= window)
entry54.pack()
entry54.place(x=167, y=104, in_= window)

entry55.pack()
entry55.place(x=1, y=127, in_= window)
entry56.pack()
entry56.place(x=21, y=127, in_= window)
entry57.pack()
entry57.place(x=41, y=127, in_= window)
entry58.pack()
entry58.place(x=64, y=127, in_= window)
entry59.pack()
entry59.place(x=84, y=127, in_= window)
entry60.pack()
entry60.place(x=104, y=127, in_= window)
entry61.pack()
entry61.place(x=127, y=127, in_= window)
entry62.pack()
entry62.place(x=147, y=127, in_= window)
entry63.pack()
entry63.place(x=167, y=127, in_= window)

entry64.pack()
entry64.place(x=1, y=147, in_= window)
entry65.pack()
entry65.place(x=21, y=147, in_= window)
entry66.pack()
entry66.place(x=41, y=147, in_= window)
entry67.pack()
entry67.place(x=64, y=147, in_= window)
entry68.pack()
entry68.place(x=84, y=147, in_= window)
entry69.pack()
entry69.place(x=104, y=147, in_= window)
entry70.pack()
entry70.place(x=127, y=147, in_= window)
entry71.pack()
entry71.place(x=147, y=147, in_= window)
entry72.pack()
entry72.place(x=167, y=147, in_= window)

entry73.pack()
entry73.place(x=1, y=167, in_= window)
entry74.pack()
entry74.place(x=21, y=167, in_= window)
entry75.pack()
entry75.place(x=41, y=167, in_= window)
entry76.pack()
entry76.place(x=64, y=167, in_= window)
entry77.pack()
entry77.place(x=84, y=167, in_= window)
entry78.pack()
entry78.place(x=104, y=167, in_= window)
entry79.pack()
entry79.place(x=127, y=167, in_= window)
entry80.pack()
entry80.place(x=147, y=167, in_= window)
entry81.pack()
entry81.place(x=167, y=167, in_= window)

canvas.pack()
canvas.place(x=0, y=0, in_= window)
canvas.create_rectangle(1, 1, 187, 187, )
canvas.create_rectangle(1, 1, 62, 187, )
canvas.create_rectangle(1, 1, 187, 62, )
canvas.create_rectangle(1, 1, 125, 187, )
canvas.create_rectangle(1, 1, 187, 125, )


def calc():
    global inputValue
	#input = self.entry1.get("1.0",'end-1c')
    inputValue=entry1.get("1.0","end-1c")
    print(inputValue)
    first()

def retrieve_input():
    inputValue=entry1.get("1.0","end-1c")
    print(inputValue)

button1 = Button(window, text="calc", command=calc)
button1.pack()
button1.place(x=75, y=190	, in_=window)

#inputValue=entry1.get("1.0","end-1c")
#print("inputValue")

window.mainloop()

