From 4ce87b1b589e6241553d20c72716954cdb415210 Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Sat, 9 Apr 2016 19:57:16 -0700 Subject: Makes "future imports" and Python version comments consistent. This makes the "future import" statements consistently specify absolute_import, print_function, and division, for maximum consistency between Python 2 and Python 3. Although absolute_import is probably a don't care for top-level programs, if unit tests were ever implemented for the programs they would be imported as modules, making the module import behavior relevant. Note that previous Python 3 fixes are a prerequisite for this change. Also makes the "polyglot comment" consistent across sources. TESTED: Using a version of SConstruct patched to use the target Python for build helpers, ran "scons build-all check valgrind-audit www/hardware.html" with all six supported Python versions. Also ran gegps, gpscat, gpsprof, xgps, and xgpsspeed with both Python 2 and Python 3. --- gpsprof | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gpsprof') diff --git a/gpsprof b/gpsprof index 6ed691e1..5c9c52d6 100755 --- a/gpsprof +++ b/gpsprof @@ -6,8 +6,9 @@ # Collect and plot latency-profiling data from a running gpsd. # Requires gnuplot. # -# This code runs under both Python 2 and Python 3. Preserve this property! -from __future__ import print_function, division +# This code runs compatibly under Python 2 and 3.x for x >= 2. +# Preserve this property! +from __future__ import absolute_import, print_function, division import copy import getopt -- cgit v1.2.1