Listing files with special names

Gustaf Liljegren gustafl at
Sun Sep 10 01:21:47 CEST 2000

I bet there's a function for this, but I can't find it. I have directory 
with several files and want a list of all files with names ending with 
"*.txt". os.listdir() is as close as I get, but as I get all files with 
that I guess I have to run a regexp on them to aquire only the textfiles. 
Any easier way?

Thanks in advance,


More information about the Python-list mailing list