GUI: Exemple d’une horloge digitale

Author:

 date, tkinter
{filelink=15429}

"""
Python in a Nutshell, 2nd Edition
By Alex Martelli
...............................................
Publisher: O'Reilly
Pub Date: July 2006
Print ISBN-10: 0-596-10046-9
Print ISBN-13: 978-0-59-610046-9
"""
import Tkinter
import time

curtime = ''
clock = Tkinter.Label( )
clock.pack( )

def tick( ):
    global curtime
    newtime = time.strftime('%H:%M:%S')
    if newtime != curtime:
        curtime = newtime
        clock.config(text=curtime)
    clock.after(200, tick)
tick( )
clock.mainloop( )

Livres Sur ce Sujet

[amazon_image id=”2212134347″ link=”true” target=”_blank” size=”medium” ]Apprendre à programmer avec Python 3[/amazon_image] [amazon_image id=”B005J2L260″ link=”true” target=”_blank” size=”medium” ]Apprenez à programmer en Python[/amazon_image] [amazon_image id=”2100508830″ link=”true” target=”_blank” size=”medium” ]Python : Petit guide à l’usage du développeur agile[/amazon_image] [amazon_image id=”2212127081″ link=”true” target=”_blank” size=”medium” ]Apprendre à programmer avec Python 3 : Avec plus de 50 pages de corigés d’exercices ![/amazon_image]

Leave a Reply

Your email address will not be published. Required fields are marked *