import string
classInterface(object):def__init__(self, interface):""" Store the NIC in the form "<if name> <MAC address> """
self.nic_info = string.split(interface," ")defget_interface(self):return self.nic_info[0]defget_mac_addr(self):return self.nic_info[1]