def getFilePathsRecursively(fileInDirectory=''):
 filePaths = getFilePaths(fileInDirectory)
 filePathsRecursively = filePaths[:]
 for filePath in filePaths:
  if os.path.isdir(filePath):
   directory = os.listdir(filePath)
   if (len(directory) > 0):
    filePathsRecursively += getFilePathsRecursively(os.path.join(filePath, directory[0]))
 return filePathsRecursively

def getFilePathsRecursively ( fileInDirectory = '' ) : filePaths = getFilePaths ( fileInDirectory ) filePathsRecursively = filePaths [ : ] for filePath in filePaths : if os . path . isdir ( filePath ) : directory = os . listdir ( filePath ) if ( len ( directory ) > 0 ) : filePathsRecursively += getFilePathsRecursively ( os . path . join ( filePath , directory [ 0 ] ) ) return filePathsRecursively
get the file paths in the directory of the file in directory .