original_docstring: Iterates over the available part templates
  
      Will get through both package's templates path and user config path to
      check for ``.part.cfg`` files.
  
      Args:
          config_path: path to the user's part template directory
  
      Returns:
          iterator over the list of templates
  
      
docstring: Iterates over the available part templates
  Will get through both package's templates path and user config path to
  check for ``.part.cfg`` files.
docstring_tokens: Iterates over the available part templates Will get through both package ' s templates path and user config path to check for ` ` . part . cfg ` ` files .
code: def list_part_templates(config_path):
      '''Iterates over the available part templates
  
      Will get through both package's templates path and user config path to
      check for ``.part.cfg`` files.
  
      Args:
          config_path: path to the user's part template directory
  
      Returns:
          iterator over the list of templates
  
      '''
      user_config_path = os.path.join(os.path.expanduser(config_path))
      pkg_config_path = os.path.join(os.path.dirname(__file__), 'templates')
  
      templates = []
      if os.path.exists(pkg_config_path):
          templates += os.listdir(os.path.join(pkg_config_path))
          print('Using parts from {}'.format(pkg_config_path), file=sys.stderr)
      if os.path.exists(user_config_path):
          templates += os.listdir(user_config_path)
          print('Using parts from {}'.format(user_config_path), file=sys.stderr)
  
      for fname in templates:
          if 'list' in fname:
              print('Warning: a part template named list.cfg exists, and cannot be called. Please change its name!', file=sys.stderr)
          if '.part.cfg' in fname:
              yield fname.replace('.part.cfg', '')
          else:
              print('Warning: file named {} does not end with .part.cfg and is ignored!'.format(fname), file=sys.stderr)
code_tokens: def list_part_templates ( config_path ) : user_config_path = os . path . join ( os . path . expanduser ( config_path ) ) pkg_config_path = os . path . join ( os . path . dirname ( __file__ ) , 'templates' ) templates = [ ] if os . path . exists ( pkg_config_path ) : templates += os . listdir ( os . path . join ( pkg_config_path ) ) print ( 'Using parts from {}' . format ( pkg_config_path ) , file = sys . stderr ) if os . path . exists ( user_config_path ) : templates += os . listdir ( user_config_path ) print ( 'Using parts from {}' . format ( user_config_path ) , file = sys . stderr ) for fname in templates : if 'list' in fname : print ( 'Warning: a part template named list.cfg exists, and cannot be called. Please change its name!' , file = sys . stderr ) if '.part.cfg' in fname : yield fname . replace ( '.part.cfg' , '' ) else : print ( 'Warning: file named {} does not end with .part.cfg and is ignored!' . format ( fname ) , file = sys . stderr )
short_docstring: Iterates over the available part templates
  Will get through both package's templates path and user config path to
  check for ``.part.cfg`` files.
short_docstring_tokens: Iterates over the available part templates Will get through both package ' s templates path and user config path to check for ` ` . part . cfg ` ` files .
comment: '''Iterates over the available part templates
  
      Will get through both package's templates path and user config path to
      check for ``.part.cfg`` files.
  
      Args:
          config_path: path to the user's part template directory
  
      Returns:
          iterator over the list of templates
  
      '''