The find module

(Obsolete, 1.5.2 only). The find module provides a single function, with the same name as the module:

find(pattern, directory) ⇒ list scans a given directory and all its subdirectories for files matching a given pattern.

For more information on the pattern syntax, see the fnmatch module.

Example: Using the find module
# File: find-example-1.py

import find

# find all JPEG files in or beneath the current directory
for file in find.find("*.jpg", "."):
    print file

.\samples\sample.jpg
 

[comment on/vote for this article]

A Django site. this page was rendered by a django application in 0.02s 2008-08-28 02:27:00.712877. hosted by webfaction.