def remove_section(file_name, section, separator='='):
 inifile = _Ini.get_ini_file(file_name, separator=separator)
 section = inifile.pop(section, {})
 inifile.flush()
 ret = {}
 for (key, value) in six.iteritems(section):
  if (key[0] != '#'):
   ret.update({key: value})
 return ret

def remove_section ( file_name , section , separator = '=' ) : inifile = _Ini . get_ini_file ( file_name , separator = separator ) section = inifile . pop ( section , { } ) inifile . flush ( ) ret = { } for ( key , value ) in six . iteritems ( section ) : if ( key [ 0 ] != '#' ) : ret . update ( { key : value } ) return ret
remove a section in an ini file .