f.braennstroem at gmx.de
Tue Mar 27 19:16:45 CEST 2007
I wrote a small gtk file manager, which works pretty well. Until
now, I am able to select different file (treeview entries) just by
extension (done with 'endswith'). See the little part below:
# print iter
value = model.get_value(iter, 1)
# if value is what I'm looking for:
if value.endswith("."+ pattern):
iter = model.iter_next(iter)
# print value
Now, I would like to improve it by searching for different 'real'
patterns just like using 'ls' in bash. E.g. the entry
'car*.pdf' should select all pdf files with a beginning 'car'.
Does anyone have an idea, how to do it?
More information about the Python-list