Ismatus3 13 Junior Poster in Training

Hello friends

In my window Tkinter there is 3 entries : actualpass , newpass , confirmnewpass .
I just want to know how to do to check all entries one by one :

if actualpass is empty : print "enter ur password"
if actualpass is not empty and and newpass is empty : print "enter ur new password" and let the actualpass full .
if the two first entries are not empty and confirmnewpass is empty : print " confirm ur new password" and let the two entries full .

The is the code of my function :

def Valider() :
    if actualpassvar.get() == '' :
       lab1.config(text = 'Entrer votre mot de passe') 
    elif newpassvar.get() == '' :
       lab1.config(text = 'Entrer votre nouveau mot de passe') 
       
    elif confirmnewpassvar.get() == '' :
       lab1.config(text = 'Confirmez le nouveau mot de passe')   
      
    if newpassvar.get() == confirmnewpassvar.get() :
       subprocess.call("/home/ismail/Bureau/cronscript.sh %s %s %s" % ( actualpassvar.get(), newpassvar.get(), confirmnewpassvar.get() ) , shell=True)
       entrynow.delete(0,END)
       entrynew.delete(0,END)
       entryconfirmnew.delete(0,END)  
    else :
       lab1.config(text = 'Les mots de passe que vous avez entré ne sont pas identiques')

Thank you for your answers :) .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.