Hi,
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:
self.pathlist1=[ ]
self.patternlis t=[ ]
while iter:
# print iter
value = model.get_value (iter, 1)
# if value is what I'm looking for:
if value.endswith( "."+ pattern):
selection.selec t_iter(iter)
selection.selec t_path(n)
self.pathlist1. append(n)
self.patternlis t.append(value)
iter = model.iter_next (iter)
# print value
n=n+1
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?
Greetings!
Fabian
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:
self.pathlist1=[ ]
self.patternlis t=[ ]
while iter:
# print iter
value = model.get_value (iter, 1)
# if value is what I'm looking for:
if value.endswith( "."+ pattern):
selection.selec t_iter(iter)
selection.selec t_path(n)
self.pathlist1. append(n)
self.patternlis t.append(value)
iter = model.iter_next (iter)
# print value
n=n+1
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?
Greetings!
Fabian
Comment