Read a group of files as a list

citlaly isalazar80 at yahoo.com.mx
Mon Sep 18 20:51:29 EDT 2006


Thanks a lot  Bearophile!! It works great! Well, it seems something
easy for experts, but for beginners as me, your help is very useful...
thanks!!
Citlalyy
>
> >>> import os
> >>> os.listdir("...path...")
> [.... file names... ]
>
> If you are using Windows I suggest you to invert the slashes of the
> path, so instead of:
> "C:\WINNT\Fonts"
> Use:
> "C:/WINNT/Fonts"
> 
> Bye,
> bearophile




More information about the Python-list mailing list