newbie class troubles
Brett Lempereur
a.lempereur
Sun Sep 17 12:09:13 EDT 2000
erm... no. my code at the minute is:
class filesearch:
# Any public variables i need
exceptions = []
filelist = []
dirlist = []
def search(self, top):
try:
tmpList = os.listdir(top)
except os.error:
return
for item in tmpList:
if item not in exceptions:
name = os.path.join(top, name)
if os.path.isdir(name):
self.dirlist.append(name)
search(self, name)
else:
self.filelist.append(name)
that's the class. you already know the error
More information about the Python-list
mailing list