0
からパイのコードの実行を作るのですか、私が実行したいコードは、Pythonからのパイの上にこのです:はどのように私はPythonの
sudo ifconfig eth0 192.168.0.1 netmask 255.255.255.0
私はos.system
またはsubprocess
か何かを使用する必要がありますか?
私が何をしたいの例はここにある:
var1 = self.controller.internet_inet_value.get()
var2 = self.controller.internet_mask_value.get()
var = subprocess.Popen(['sudo', 'ifconfig', 'eth1', '%s' %
self.controller.internet_inet_value.get(), 'netmask', '%s'
self.controller.internet_mask_value.get()])