I want to modify a hostapd config file using python
#
# Wireless Interface
#
interface=wlp2s0
driver=nl80211
#
# Wireless Environment
#
# Currently not working due to
# regulatory restrictions on 5GHz wifi
# in driver
#
ssid=bobthebuilder
hw_mode=a
ieee80211d=1
country_code=GB
channel=40
ieee80211n=1
(etc)
But the configparser library requires headers for config sections to use - us there another library that I can use to edit this file instead?