是否有可以配置网络接口IP地址的python软件包? [英] Is there any python package that could configure IP address of network interface?

查看:72
本文介绍了是否有可以配置网络接口IP地址的python软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个服务器应用程序,该应用程序允许远程客户端显示/添加/更改/删除运行主机的计算机的网络接口的IP地址.

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.

该操作系统是Linux(CentOS 5.2),因此我可以通过简单地解析和编辑配置文件来做到这一点.但是,有没有可以简化工作的软件包?

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?

推荐答案

它看起来像开源项目 conf 应该可以轻松地完成您想要的操作.实际上,他们的示例之一就是轻松解析和修改/etc/sysconfig/network-scripts/ifcfg-eth0.

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

这篇关于是否有可以配置网络接口IP地址的python软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆