currently my os.walk code list’s all the files in all directories under the specified directory.
top = /home/bludiescript/tv-shows
for dirpath, dirnames, filenames in os.walk(top):
for filename in filenames:
print os.path.join([dirname, filename])
so how could i add
glob.glob(search)
search = self.search.get_text
to search for the pattern that i type in the gtk.Entry
or is this something that would not work with my current code
You don’t want
glob.globfor this; it checks against names in the directory, which you’ve already retrieved. Instead, usefnmatch.fnmatchto match your pattern against the list of pathnames you got fromos.walk(probably before you add the path).