lkml.org 
[lkml]   [2019]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] perf scripts python: Add Python 3 support to failed-syscalls-by-pid.py
From
Date
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

\
 
 \ /
  Last update: 2019-01-19 03:38    [W:0.204 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site