Link to home
Start Free TrialLog in
Avatar of tf2012
tf2012

asked on

linux / python expert needed

I'm working on an gui app in python/pyside (Qt) and one of the features is to modify the network configuration from the UI.

I can use os.system to pass along 'ifconfig eth0 bla bla bla' to the shell and on to the system for setting the ip address, dhcp, etc.  But I can't figure out how to assign dns ip address.  It seems to be stored in a file by linux but how can the dns addresses be overwritten (aka modified) by passing commands to the shell.  ie. "ifconfig dns1 192.168.0.12'... ok I know that statement is bogus but that's the kind of solution I"m looking for.

I've been looking at the python package dns.resolve but I'm not sure that will work for what I'm trying to do (assign dns addresses as part of the network config).

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tf2012
tf2012

ASKER

thanks
You're welcome.

Glad I could help!