Dealing with files...
Gerhard Häring
gh at ghaering.de
Fri Apr 25 19:44:45 EDT 2003
More information about the Python-list mailing list
Fri Apr 25 19:44:45 EDT 2003
- Previous message (by thread): Dealing with files...
- Next message (by thread): Dealing with files...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"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'
The long answer is to read the docs for the os module.
The short answer is that Alex meant 'listdir'.
-- Gerhard
- Previous message (by thread): Dealing with files...
- Next message (by thread): Dealing with files...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list