diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2016-03-22 04:11:28 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-03-22 04:11:28 -0400 |
commit | c904362d06f325e2d3c1bcdebd702b5d274a1cdd (patch) | |
tree | 6b4f58444faacbac894fb042af363c1d6e1a89c3 /leapsecond.py | |
parent | 8200880a4949fd112674551374868f292b8a6524 (diff) | |
download | gpsd-c904362d06f325e2d3c1bcdebd702b5d274a1cdd.tar.gz |
Forward-port gps/ Python client code to run polyglot under Python 2 or 3.
Verified by testing gpsprof under both versions. leapecond.py is also OK.
Not yet polyglot: gegps, gpscap.py, gpscat, gpsfake, jsongen.py, maskaudit.py,
test_maidenhead.py, valgrind_audit.py, xgps, xgpsspeed.
Diffstat (limited to 'leapsecond.py')
-rwxr-xr-x | leapsecond.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/leapsecond.py b/leapsecond.py index e778d236..89c38661 100755 --- a/leapsecond.py +++ b/leapsecond.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python """ Usage: leapsecond.py [-v] { [-h] | [-f filename] | [-g filename] | [-H filename] @@ -43,6 +43,7 @@ This file is Copyright (c) 2013 by the GPSD project BSD terms apply: see the file COPYING in the distribution root for details. """ +# This code runs under both Python 2 and Python 3. Preserve this property! from __future__ import print_function import os, urllib, re, random, time, calendar, math, sys, signal |