May 20, 2026

Wiki

Python

Aide

edit SideBar

Search

Une Page Au Hasard


Le module glob permet d'obtenir tous les fichiers du répertoire courant, dont le nom satisfait une expression rationnelle passée en argument.

Ce module contient deux fonctions : glob et iglob, qui ne diffèrent que par leurs retours,

  • une liste pour glob,
  • un itérateur pour iglob.
 >>> from glob import glob
 >>> glob('*py')
 ['ondelette.py', 'fibo.py', 'scriptSavoir.py', 'sha2.py', 'mail.py', 
   'foret2.py', 'interface.py', 'jacobi.py', 'test.py', 'totto.py', 
   'imailer.py', 'envoiPDFprofs.py']


This page may have a more recent version on pmwiki.org: PmWiki:UnePageAuHasard, and a talk page: PmWiki:UnePageAuHasard-Talk.

Page Actions

Recent Changes

Group & Page

Back Links