From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 177E92934 for ; Thu, 8 Dec 2016 10:07:25 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 08 Dec 2016 01:07:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,318,1477983600"; d="scan'208";a="15319276" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga002.jf.intel.com with ESMTP; 08 Dec 2016 01:07:23 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.91]) by IRSMSX153.ger.corp.intel.com ([169.254.9.203]) with mapi id 14.03.0248.002; Thu, 8 Dec 2016 09:07:23 +0000 From: "Mcnamara, John" To: Martin Kletzander , Thomas Monjalon CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] Force python scripts to run with python2 Thread-Index: AQHSUHu7ciUkOO+xx0u0sSFwFiRUxaD8Yt3ggAAuJ4CAAStAgIAAByQA Date: Thu, 8 Dec 2016 09:07:22 +0000 Message-ID: References: <2927865.NFSFPUUofa@xps13> <20161208083941.GA20753@wheatley> In-Reply-To: <20161208083941.GA20753@wheatley> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzc2ZjI2MTMtNWI1Ny00MDE4LTkyOGYtZjI3NTQxNTQ1ZTdjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlJHMUFTbGNoRE80dkhKQ20zU0FEcSsxTFloNFUxMXVxTHJaTXBuK0JGVUk9In0= x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] Force python scripts to run with python2 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2016 09:07:26 -0000 > -----Original Message----- > From: Martin Kletzander [mailto:mkletzan@redhat.com] > Sent: Thursday, December 8, 2016 8:40 AM > To: Thomas Monjalon > Cc: dev@dpdk.org; Mcnamara, John > Subject: Re: [dpdk-dev] [PATCH] Force python scripts to run with python2 >=20 > On Wed, Dec 07, 2016 at 03:48:37PM +0100, Thomas Monjalon wrote: > >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. >=20 > I have not come across a system that would not have python2 as at least a > symlink or an executable. However if that is the concern, I can have a > look at making all scripts python3 compatible, although I'm not yet > familiar enough with DPDK to be able to properly test all of them. So > I'll try and ask if needed. >=20 > Thanks for the input. >=20 Hi Martin, I'll work on adding Python2/3 compatibility, and while I'm at it PEP8 compa= tibility. John