def get_vendor_from_pci_id(pci_id):
 cmd = ("lspci -n | awk '/%s/ {print $3}'" % pci_id)
 return re.sub(':', ' ', commands.getoutput(cmd))

def get_vendor_from_pci_id ( pci_id ) : cmd = ( "lspci -n | awk '/%s/ {print $3}'" % pci_id ) return re . sub ( ':' , ' ' , commands . getoutput ( cmd ) )
check out the device vendor id according to pci_id .