> -----Original Message----- > From: fio-owner@xxxxxxxxxxxxxxx <fio-owner@xxxxxxxxxxxxxxx> On Behalf > Of Vincent Fu > Sent: Tuesday, May 26, 2020 9:33 AM > To: Rebecca Cran <rebecca@xxxxxxxxx>; fio@xxxxxxxxxxxxxxx > Cc: Jens Axboe <axboe@xxxxxxxxx> > Subject: Re: Python scripts - /usr/bin/env python3 vs python vs > python2.7 > > On 5/26/20 10:13 AM, Rebecca Cran wrote: > > Python scripts in fio use a variety of methods to run the python > > interpreter: t/run_fio_tests.py has "#!/usr/bin/env python3" while > > t/strided.py has "#!/usr/bin/python", and sgunmap-test.py has > > "#!/usr/bin/python2.7". > > > > > > Would there any interest in converting them all to use > > "#!/usr/bin/env python3 ? > > I think having a uniform python interpreter line would be a good > thing. I have been using python a lot recently and also noticed that the /usr/bin/env format is the preferred approach; it works best across linux distros, local installs, and is even recognized by Python in Windows. Most of the scripts include comments claiming python3 compatibility; one does not. t/sgunmap-perf.py:#!/usr/bin/python2.7 t/sgunmap-perf.py:# REQUIREMENTS t/sgunmap-perf.py:# Python 2.6+ t/sgunmap-test.py:#!/usr/bin/python2.7 t/sgunmap-test.py:# Note: this script is python2 and python 3 compatible. t/steadystate_tests.py:#!/usr/bin/env python t/steadystate_tests.py:# Note: this script is python2 and python3 compatible. t/strided.py:#!/usr/bin/python t/strided.py:# Note: this script is python2 and python3 compatible. tools/fiologparser.py:#!/usr/bin/python2.7 tools/fiologparser.py:#!/# Note: this script is python2 and python 3 compatible.