Better way to searching.
farsheed
rodmena.com at gmail.com
Fri Dec 14 02:13:37 EST 2007
my code is here:
_________________________________________________________________________
def Globing(self, dir, extension, nop, inputDepth):
'It creates a basic glob function that needed in other classes'
self.exop = '*.'
self.opr = '*/'
self.counter = ''
self.files = []
self.path = ''
for i in range (inputDepth):
self.path = dir + self.opr * i + self.exop * nop + extension
#like this: */*/*.*.mpg
self.counter = glob.glob(self.path)
self.files += self.counter
return self.files
____________________________________________________________________________
Is there any better and faster way to do this?
More information about the Python-list
mailing list