[Tutor] Python suddenly finding ".DS_Store" files in folder

Scot W. Stevenson scot at possum.in-berlin.de
Wed Apr 7 09:21:25 EDT 2004

Hello there, 

Part of a Python program I'm writing uses the os.listdir("myfolder") call to 
get a list of the files in a folder (Python 2.3.3, Mac OS X 10.3.3). 
Suddenly, without me doing anything I'm aware of, I have a file


in my directory, which screws up all kinds of things. I can't see how Python 
is doing this (but I'm writing here just to be sure), and Mac OS X shouldn't 
be running around inserting files into my Python folders, either, and, 
finally, I'm not happy about os.listdir() finding hidden files without me 
explicitly telling it to. That is, uh, sort of the reason for having them 

Does any of this make any sense, and if yes, does anybody have any 

Thank you,
Y, Scot

                Scot W. Stevenson - Panketal, Germany

More information about the Tutor mailing list