diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2016-03-22 05:07:37 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-03-22 05:07:37 -0400 |
commit | 8c23561f6a02cb8df93f8b26bdc34de13d1fbd1f (patch) | |
tree | 6baba9effd2a7553cee0910b304bbef2a7337c95 /gegps | |
parent | 3e8b9be3a77635781ebca888d7aa73162a3588cd (diff) | |
download | gpsd-8c23561f6a02cb8df93f8b26bdc34de13d1fbd1f.tar.gz |
gegps now runs polyglot under Python 2 and 3.
Diffstat (limited to 'gegps')
-rwxr-xr-x | gegps | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python # -*- coding: utf-8 -*- # # usage: gegps [-i] [-d kmldir] @@ -20,6 +20,7 @@ # Modified by Chen Wei <weichen302@aol.com> for use with gpsd # Cleaned up and adapted for the GPSD project by Eric S. Raymond. +# This code runs under both Python 2 and Python 3. Preserve this property! from __future__ import print_function import sys, os, getopt @@ -89,7 +90,7 @@ if __name__ == "__main__": else: try: while True: - report = next(session) + report = session.next() if report['class'] == 'TPV': f = open(os.path.join(kmldir, 'Realtime_GPS.kml'), 'w') f.write(kmlize(report)) |