[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <463ab33a-7ba0-0358-0be9-c0bb17a02785@suse.de>
Date: Fri, 18 Jan 2019 18:37:34 -0800
From: Tony Jones <tonyj@...e.de>
To: Seeteena Thoufeek <s1seetee@...ux.vnet.ibm.com>,
peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
namhyung@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] perf scripts python: Add Python 3 support to
failed-syscalls-by-pid.py
On 1/18/19 5:12 PM, Tony Jones wrote:
> On 1/17/19 1:45 AM, Seeteena Thoufeek wrote:
>
>> +from __future__ import print_function
>
> You don't need this unless you're actually requiring functionality that only exists in v3.
> For example, you need it to handle the suppress newline functionality such as "end=".
Also, it brings up a question I had. What python versions are expected to be supported with PYTHON=python2?
https://python-future.org/imports.html So importing from future (for end='' support) implies >= 2.6.
The base release of 2.6 was October 2008 so maybe this is fine. Otherwise it may be preferable to use sys.stdout.write which has more consistent semantics (see
tools/perf/scripts/python/compaction-times.py)
Tony
Powered by blists - more mailing lists