#! /usr/bin/env python

from abjad.cfg.cfg import ABJADPATH
from abjad.tools import iotools
import os


def _list_private_modules():
   tools_path = os.path.join(ABJADPATH, 'tools')
   private_module_names = [ ]
   for path, subdirectories, files in os.walk(tools_path):
      for f in files:
         if f.endswith('.py'):
            if not f == '__init__.py':
               if f.startswith('_'):
                  if f[1].islower():
                     full_name = os.path.join(path, f)
                     private_module_names.append(full_name)
   total_private = len(private_module_names)
   for x in private_module_names:
      print x
   print 'Total private module names: %s' % total_private
   print ''
      

if __name__ == '__main__':
   iotools.clear_terminal()
   _list_private_modules()
