From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] Force python scripts to run with python2 Date: Wed, 07 Dec 2016 15:48:37 +0100 Message-ID: <2927865.NFSFPUUofa@xps13> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "Mcnamara, John" To: Martin Kletzander Return-path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id B96572BAF for ; Wed, 7 Dec 2016 15:48:39 +0100 (CET) Received: by mail-wm0-f49.google.com with SMTP id f82so170546427wmf.1 for ; Wed, 07 Dec 2016 06:48:39 -0800 (PST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-12-07 12:04, Mcnamara, John: > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Martin Kletzander > > Sent: Wednesday, December 7, 2016 10:17 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH] Force python scripts to run with python2 > > > > With python3 being the default in some distributions/installations, > > shebang with just "python" will make the script run under version of > > python that the scripts are not written for. In order to fix that and > > mitigate future errors, use shebang properly and specify the python > > version. That way the scripts will run in any distro/install, no matter > > what python version is set as the default. > > I think a better approach would be to make the scripts Python 2 and Python 3 compatible. > > Some of the new ones already are. Yes The "solution" using python2 in the shebang does not work everywhere because python2 can be an unknown command.