【发布时间】:2018-05-09 09:07:31
【问题描述】:
我想使用 python 修改一个 hostapd 配置文件
#
# 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
(等)
但是 configparser 库需要配置部分的标头才能使用 - 我们还有另一个库可以用来编辑此文件吗?
【问题讨论】:
-
该答案中的 ConfigObj 库看起来可以满足我的需求
标签: python