en la parte de las funciones, la de validacion quiero que cuando presione un boton vea si esta "@gmail.com" dentro del entry "e_correo" el problema es que si escribo por ejemplo "[email protected]" no lo vale por la "a" y yo quiero que se ponga un correo alguien sabe que puedo hacer?esto lo hice con tkinter
from tkinter import *
from tkinter import messagebox
from turtle import color
import tkinter as tk
#ventana
ventana = tk.Tk()
ventana.title("registracion")
ventana.geometry("700x550")
ventana.configure(background = "white smoke")
#Entrys
e_username = tk.Entry(ventana).place( y = 40,x = 13, width = 300, height = 25)
el entry de abajo
e_correo = tk.Entry(ventana)
e_contraseña = tk.Entry(ventana).place( y = 232,x = 13, width = 300, height = 25 )
e_correo.place( y = 140,x = 13, width = 300, height = 25)
justo aqui
#funciones
def validar():
if e_correo.get()== "@gmail.com":
abrirventana2()
else:
messagebox.showwarning("cuidado","correo no valido")
def abrirventana2():
ventana.withdraw()
win = tk.Toplevel()
win.geometry("380x300+700+200")
win.configure(background = "white smoke")
e3 = tk.Label(win,text = "bienvenido", bg = "pink", fg = "white")
e3.pack(padx=5,pady=5,ipadx=5,ipady=5,fill=tk.X)
#Label
Label(ventana, text = "Username",font = ("LEMON_MILK_Medium", 14) ,foreground = "blue",bg =
"white smoke", anchor = W, ). place(y = 8, x = 9)
Label(ventana, text = "Correo Electronico", font = ("LEMON_MILK_Medium", 14),foreground =
"blue",bg = "white smoke", anchor = W).place(y = 100, x = 9 )
Label(ventana, text = "Contraseña", font = ("LEMON_MILK_Medium", 14),foreground = "blue",bg =
"white smoke", anchor = W).place(y = 192, x = 9 )
#botones
este es el boton
boton_aceptar = Button(ventana, text = "terminar regristro", width = 30, height = 2, command =
validar)
boton_aceptar.place(y = 500)
ventana.mainloop()