i believe i solved it
search = self.search.get_text()
top = /home/bludiescript/tv-shows
for dirpath, dirnames, filenames in os.walk(top):
for filename in filenames:
if fnmatch.fnmatch(filename, search)
print os.path.join([dirname, filename])
but now how could i print os.path.join([dirname, filename]) to a list if self.list = []
and self.contents = "/n".join(self.list)
in fact its not sovled does fnmatch look for the whole filename or can it be a single word in a file/files
on python docs it shows useing the [seq] to match and character in seq so i tried fnmatch.fnmatch(filename, [search]) and it gave an error unhashable list.
Last edited by bloodyscript; 09-24-2011 at 03:39 PM.
|