Python – ny python package that could configure IP address of network interface

linuxpython

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?

Best Answer

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. ;)

Related Topic