Dealing with files...

Alex Martelli aleax at aleax.it
Fri Apr 25 19:54:20 EDT 2003


<posted & mailed>

lost wrote:

> On Fri, 25 Apr 2003 22:51:12 +0000, Alex Martelli wrote:
> 
>> for each_file in os.dir('/var/path/to/files/'):
> 
> actually, not quite what i was looking for :)
> At this line, I get:
> AttributeError: 'module' object has no attribute 'dir'

os.listdir -- sorry, if I wrote os.dir it must have been a typo.


Alex





More information about the Python-list mailing list