From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) by dpdk.org (Postfix) with ESMTP id 4A5855681 for ; Fri, 26 Aug 2016 02:37:17 +0200 (CEST) Received: by mail-pf0-f170.google.com with SMTP id y134so22554105pfg.0 for ; Thu, 25 Aug 2016 17:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tPp2h0+bZzxgbq4W52tii+QlQmWJLQseLNbjwPWm4D8=; b=gs62ONmMf9Ih2uVOAzh8PJHKdb22VKo7qHCkEh/NAEKm3RNRWRjh+c73PZvseSHdmz 4G1fIhcIULpsxqQr6jpzVZlN6esNQYu/14wW5N0OOVR8umi87GZHpzbw04Nb4zYP9gah xUHn8wj8C+lTPasj96l6oQ8WBDuGJZVdBuVqHLlA/1Npow7adNAQxtVJ4+W9ImNn1Gpj /fw2oADQiB/42M0X5NFKqSmLmtOzjCxMO45r+aVnQwauIYWlrC1oMp/wGZ0PRD19Hc/S cyBM4n0T8FzHjc2obIZZ9gpVKXYB0ffJ1UQXBcQAKywORFQMC8Mgd82xtCSbCOI4QXEx wywQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tPp2h0+bZzxgbq4W52tii+QlQmWJLQseLNbjwPWm4D8=; b=FMJDz5ZC0QE6QoDdyU488sKW27Q1xCqcCNgLYaqJcvNtPpZlWKPnq5c7ysT9uqqANM d9aeBT7gHADcj6AmCNCEYYtVeqmnkCMvVO18OGb3PibndNaOKxr0jh6sxqFslnHr8JBI fcM7rc2fLcQV2CBlWBGgIn3plWi+dfY3rxjbpXFXddOesZFcl47wk618MON9vLza5f6J YZ0Co+MfnodBIltgOV97v8hWzaGN9q2X9dYzfKJnCNSGhPfGSgvJn8ICwIXD2otWF31h AegsOpnt1C45FtAm87mcrdtz3LLHZgd/9blFxDRTJuhqC6nOxcMMjB0Z6kE617JzVVSY Sl7w== X-Gm-Message-State: AE9vXwP6W9tMTkxO2q7b0+GWfErFRzsbqaD9zylL0SiFt+oaaQVJXJXkitJ2YYiw4WZPqA== X-Received: by 10.98.86.85 with SMTP id k82mr802003pfb.82.1472171836683; Thu, 25 Aug 2016 17:37:16 -0700 (PDT) Received: from xeon-e3 (static-50-53-69-251.bvtn.or.frontiernet.net. [50.53.69.251]) by smtp.gmail.com with ESMTPSA id l81sm23483392pfi.50.2016.08.25.17.37.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Aug 2016 17:37:16 -0700 (PDT) Date: Thu, 25 Aug 2016 17:37:29 -0700 From: Stephen Hemminger To: souvikdey33 Cc: , Message-ID: <20160825173729.1d73154e@xeon-e3> In-Reply-To: <20160825022546.96468-1-sodey@sonusnet.com> References: <20160825022546.96468-1-sodey@sonusnet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1] dpdk-devbind.py: Virtio interface issue. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2016 00:37:17 -0000 On Wed, 24 Aug 2016 22:25:46 -0400 souvikdey33 wrote: > + #The path for virtio devices are different. Get the correct path. > + virtio = "/sys/bus/pci/devices/%s/" % dev_id > + cmd = " ls %s | grep 'virt' " %virtio > + virtio = commands.getoutput(cmd) I am not a python export but in general it is better to use native language facilities likes os.listdir() rather than using shell pipes.