def list_config_modules(etcdir):
 if (not os.path.isdir(etcdir)):
  return iter(())
 return (name for name in os.listdir(etcdir) if (name.endswith('.py') and os.path.isfile(os.path.join(etcdir, name))))

def list_config_modules ( etcdir ) : if ( not os . path . isdir ( etcdir ) ) : return iter ( ( ) ) return ( name for name in os . listdir ( etcdir ) if ( name . endswith ( '.py' ) and os . path . isfile ( os . path . join ( etcdir , name ) ) ) )
returns an iterator that yields the name of all the config modules .