file find skips first letter
wanderer at dialup4less.com
Tue Feb 15 19:32:08 CET 2011
I'm using code
def getFiles(self, fileBase):
"""return a list of the filenames in a director containing a
allFiles = os.listdir(self.resultDir)
baseFiles = 
for f in allFiles:
if f.find(fileBase) > 0:
but the code can't find files with fileBase in it if the fileBase
starts the filename.
if the filenames are rnoise##.tif and fileBase is "rnoise" the file
won't be found. If fileBase is "noise" the files will be found.
More information about the Python-list