简体   繁体   中英

Is there any python package that could configure IP address of network interface?

I am writing a server application which allow remote client to show/add/change/delete IP addresses of network interfaces of the machine where the host is running.

The OS is Linux(CentOS 5.2), so I could do that by simply parse and edit configure file. But is there any package that could simplify the job?

And if there is none such package, if I open source my implementation, will that help other people?

It looks like the open source project confparse should be able to easily do what you're looking for. In fact, one of their examples is parsing and modifying /etc/sysconfig/network-scripts/ifcfg-eth0 with ease.

If you find this isn't what you need, I say that any efforts towards open sourcing software will inevitably help other people at some point, given that it is actually useful. ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM