29 September 2012 Python;*: Exemple de conversion des dates Les Bibliothèques Standards import time try: strptime = time.strptime except AttributeError: from strptime import strpimport time try: strptime = time.strptime except AttributeError: from strptime import strp python
25 September 2012 Python: Afficher l’heure en format Integer Les Bibliothèques Standards import time now = time.time() tm = time.localtime(now) print "date->", now print now print time import time now = time.time() tm = time.localtime(now) print "date->", now print now print time python
27 August 2012 Python: Afficher la date et l’heure en plusieurs formats Les Bibliothèques Standards import time # Obtenir l'heure et la date locale now = time.localtime(time.time()) print time.asctimport time # Obtenir l'heure et la date locale now = time.localtime(time.time()) print time.asct python
27 August 2012 Python: Afficher l’heure et la date actuelle Les Bibliothèques Standards import time now = time.time() print "L'heure et la date actuelle:", time.localtime(now) print "Enimport time now = time.time() print "L'heure et la date actuelle:", time.localtime(now) print "En python
13 July 2012 Afficher des informations sur un fichier Fichiers import os, time fichier= 'c:/test.txt' # Taille de fichier en octets print os.path.getsizeimport os, time fichier= 'c:/test.txt' # Taille de fichier en octets print os.path.getsize python
16 May 2012 Exemple d’animation à l’aide des Threads(code externe) GUI #/* #Python and Tkinter Programming #John E. Grayson #ISBN: 1884777813 #Publisher: Manning#/* #Python and Tkinter Programming #John E. Grayson #ISBN: 1884777813 #Publisher: Manning python
22 February 2012 Démarrer un Thread avec la méthode start() Thread import thread import time def print_time(nomThread, delai): """ Afficher la date et l'himport thread import time def print_time(nomThread, delai): """ Afficher la date et l'h python
20 February 2012 Collecter les liens d’une page web Réseaux """ Tiré du livre gratuit "Plongez au coeur de Python", Pour plus d'information. Visitez h """ Tiré du livre gratuit "Plongez au coeur de Python", Pour plus d'information. Visitez h python
17 February 2012 GUI: Exemple d’une horloge digitale GUI """ Python in a Nutshell, 2nd Edition By Alex Martelli ..........................................""" Python in a Nutshell, 2nd Edition By Alex Martelli .......................................... python
8 February 2012 Exemple de combinaison des dictionnaires Dictionnaire pair = [2, 4, 6, 8] impair= [1, 3, 5, 7, 9] dict={'pair':pair, 'impair':impair} params = {'Ppair = [2, 4, 6, 8] impair= [1, 3, 5, 7, 9] dict={'pair':pair, 'impair':impair} params = {'P python