def getPythonDirectoryNamesRecursively(directoryName=''):
 recursivePythonDirectoryNames = []
 if (directoryName == ''):
  directoryName = os.getcwd()
 if os.path.isfile(os.path.join(directoryName, '__init__.py')):
  recursivePythonDirectoryNames.append(directoryName)
  pythonDirectoryNames = getPythonDirectoryNames(directoryName)
  for pythonDirectoryName in pythonDirectoryNames:
   recursivePythonDirectoryNames += getPythonDirectoryNamesRecursively(pythonDirectoryName)
 else:
  return []
 return recursivePythonDirectoryNames

def getPythonDirectoryNamesRecursively ( directoryName = '' ) : recursivePythonDirectoryNames = [ ] if ( directoryName == '' ) : directoryName = os . getcwd ( ) if os . path . isfile ( os . path . join ( directoryName , '__init__.py' ) ) : recursivePythonDirectoryNames . append ( directoryName ) pythonDirectoryNames = getPythonDirectoryNames ( directoryName ) for pythonDirectoryName in pythonDirectoryNames : recursivePythonDirectoryNames += getPythonDirectoryNamesRecursively ( pythonDirectoryName ) else : return [ ] return recursivePythonDirectoryNames
get the python directories recursively .