glob and directory

Thomas Bryan tbryan at arlut.utexas.edu
Tue Jul 27 04:04:38 EDT 1999


too at pk.highway.ne.jp wrote:

> is there any way to determine
> if the given name is directory or not ?

os.path.isdir

If you're just globbing '*', then you could also use

os.listdir('.')

It'll save you from having to type "import glob". :)

-------------------------------------------
Tom Bryan
Applied Research Laboratories
University of Texas at Austin




More information about the Python-list mailing list