[Python] multi typage avec glob.glob ???
Résolu
tata-titi
Messages postés
42
Date d'inscription
Statut
Membre
Dernière intervention
-
tata-titi Messages postés 42 Date d'inscription Statut Membre Dernière intervention -
tata-titi Messages postés 42 Date d'inscription Statut Membre Dernière intervention -
Comment simplifier le bout de code suivant pour lister les fichiers du repertoire au fur et a mesure que se sont des log ou des zip ???
---------------------------------------------------------------------------
chemin1 = "C:\\bidon\\*.log"
chemin2 = "C:\\bidon\\*.zip"
totalRepSize = 0
tab = []
for filename in glob.glob(chemin1) :
print "filename -- log -- : ",filename
for filename in glob.glob(chemin2) :
print "filename -- zip -- : ",filename
---------------------------------------------------------------------------
chemin1 = "C:\\bidon\\*.log"
chemin2 = "C:\\bidon\\*.zip"
totalRepSize = 0
tab = []
for filename in glob.glob(chemin1) :
print "filename -- log -- : ",filename
for filename in glob.glob(chemin2) :
print "filename -- zip -- : ",filename
A voir également:
- [Python] multi typage avec glob.glob ???
- Citizen code python avis - Accueil - Outils
- Youtube multi downloader - Télécharger - Conversion & Codecs
- Sfr multi - Accueil - Opérateurs & Forfaits
- Multi boot windows - Guide
- Python pix ✓ - Forum Python