0
I created a script basically to replace links by removing some special characters. It’s functional. The problem is only the data output, because I am putting to present a label, with the link already without the special characters, so it is not possible to copy the link through the interface. Is the result of this script to be presented in a way that is possible to copy the link, or click? In addition, it is possible that when the script output is larger than the program interface, there is an automatic line break?
from tkinter import *
conversor = Tk()
conversor.title("CONVERSOR DE LINKS")
conversor["bg"] = "white"
conversor.geometry("600x300")
entrada1 = Entry(conversor)
entrada1.place(width= 500, x=50, y=100)
def bt_converter():
link = (entrada1.get())
link = link.replace("%2f", "/")
link = link.replace("%3f", "?")
link = link.replace("%3d", "=")
retorno["text"] = link
btenvio = Button(conversor, width=20, text="Converter", command=bt_converter)
btenvio.place(x=230, y=130)
lb = Label(conversor, text= "DIGITE O LINK")
lb.place(x=180, y=70)
lbretorno = Label(conversor, text="LINK UTILIZÁVEL")
lbretorno.place(x=250, y=180)
retorno = Label(conversor, text="")
retorno.place (width= 500, x=50, y=210)
conversor.mainloop()
Thanks friend. I created a button called copy, I defined a method with this Clipboard and it worked right. I also created another to access, using callback!
– Gabriel Nogueira