1

I made this GUI:

GUI screenshot

And after I click 'Run', my main program starts.

In my main program, I have a lot of prints that I want to display in the GUI, but have no idea how.

I saw some examples in google but it was really hard to understand and how to convert it to my needs, so: How to make a window with all the prints after I click the Run button ?

code:

from tkinter import *
from main import *


root = Tk()

root.configure(background="orange")
root.wm_title("Python Project")

label_1 = Label(root, text="Project Name",bg="orange",fg="black")
label_2 = Label(root, text="Site URL Link",bg="orange",fg="black")
entry_1 = Entry(root)
entry_2 = Entry(root)

label_1.grid(row=0,sticky=W)
label_2.grid(row=3333,sticky=W)

entry_1.grid(row=0, column=1, padx=50, ipadx=100)
entry_2.grid(row=3333, column=1, ipadx=100)

def callback():
    a1 = entry_1.get()
    a2 = entry_2.get()
    mmm(a1,a2) # main program

button1 = Button(root,text="Run",command=callback)
button2 = Button(root,text="Quit",command=root.quit)

button1.grid(row=3334, ipadx=15, padx=50, column=1)
button2.grid(row=3335, column=1, ipadx=15, padx=50)


root.mainloop()
Itay Katsnelson
  • 69
  • 1
  • 2
  • 8

0 Answers0