summaryrefslogtreecommitdiffstats
path: root/Lib/find.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-07-01 16:59:29 (GMT)
committerFred Drake <fdrake@acm.org>1999-07-01 16:59:29 (GMT)
commitb5879ca2e93564545fd684572b9be816ede7d27f (patch)
treecfacf99bffc99c8feb91eb78e126112991abc558 /Lib/find.py
parent85b5683307edae77670743437909e0aa91acd4f3 (diff)
downloadcpython-b5879ca2e93564545fd684572b9be816ede7d27f.zip
cpython-b5879ca2e93564545fd684572b9be816ede7d27f.tar.gz
cpython-b5879ca2e93564545fd684572b9be816ede7d27f.tar.bz2
Relocating file to Lib/lib-old.
Diffstat (limited to 'Lib/find.py')
-rw-r--r--Lib/find.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/Lib/find.py b/Lib/find.py
deleted file mode 100644
index ccd9fdb..0000000
--- a/Lib/find.py
+++ /dev/null
@@ -1,26 +0,0 @@
-import fnmatch
-import os
-
-_debug = 0
-
-_prune = ['(*)']
-
-def find(pattern, dir = os.curdir):
- list = []
- names = os.listdir(dir)
- names.sort()
- for name in names:
- if name in (os.curdir, os.pardir):
- continue
- fullname = os.path.join(dir, name)
- if fnmatch.fnmatch(name, pattern):
- list.append(fullname)
- if os.path.isdir(fullname) and not os.path.islink(fullname):
- for p in _prune:
- if fnmatch.fnmatch(name, p):
- if _debug: print "skip", `fullname`
- break
- else:
- if _debug: print "descend into", `fullname`
- list = list + find(pattern, fullname)
- return list