i want to make this as an executable file which can be used as ann app on any computer to reveal their ip and mac address and i want the printed result to appear on the GUI but i have no idea how to do that.Here's the code:
from tkinter import *
import socket
import re, uuid
root = Tk()
root.geometry("400x250")
frame = Frame(root)
frame.bind("<Button-1>")
frame.pack()
def printName(event):
hostname = socket.gethostname()
IPAddr = socket.gethostbyname(hostname)
print("Your computer name is:" + hostname)
print("Your Computer IP Address is:" + IPAddr)
print ("The MAC address is formatted and expressed in a less complex way : ", end="")
print (':'.join(re.findall('..', '%012x' % uuid.getnode())))
theLabel = Label(root, text="IP-Mac",)
theLabel.pack()
button_1 = Button(root, text="show")
button_1.bind("<Button-1>", printName)
button_1.pack()
root.mainloop()