From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 7 Aug 2014 06:57:09 -0400 Subject: [U-Boot] [RFC PATCH v2 0/2] Make Python scripts compatible with older versions In-Reply-To: <53DF87CC.3050104@compulab.co.il> References: <53DF6CBC.8040701@compulab.co.il> <20140804210046.D55A.AA925319@jp.panasonic.com> <20140804215937.D55E.AA925319@jp.panasonic.com> <53DF87CC.3050104@compulab.co.il> Message-ID: <20140807105709.GR19374@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Aug 04, 2014 at 04:17:00PM +0300, Igor Grinberg wrote: > Hi Masahiro, > > On 08/04/14 15:59, Masahiro Yamada wrote: > > Hi. > > > >> > >>> It seems that those scripts only work on Python versions 2.6 - 2.7? > > > > > > > > I took a quick look and I found Python 3.x is not comatible 2.x at all. > > > > 3.x requires the "print" is called like > > print(msg, file=sys.stderr) > > but it failes in Python 2.7.x. > > Last time I checked the print function, it worked with parenthesis on > both versions 2.7 and 3.x. > > > > > Moreover, "except ... , ..." fails in 3.x > > while "except ... as ..." fails in 2.5 or earlier. > > > > If the compatibility with python 3 is the requirement, > > I can't do this. I must throw Python scripts away. > > I think we'd better replace these with something more stable > in terms of API... bash? perl? I don't think API is an argument against python, we just need /usr/bin/env python2 as how we invoke our scripts. The question is, what helper scripts do we really need to have around and expect many people to use. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: