File: example_aiogps_run

package info (click to toggle)
gpsd 3.27-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,056 kB
  • sloc: ansic: 74,438; python: 16,521; sh: 890; cpp: 848; php: 225; makefile: 197; perl: 111; javascript: 26; xml: 11
file content (28 lines) | stat: -rwxr-xr-x 679 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Copyright 2019 Grand Joldes (grandwork2@yahoo.com).
#
# This file is Copyright 2019 by the GPSD project
#
# SPDX-License-Identifier: BSD-2-clause

# This code runs only under Python 3.x for x >= 6.

"""
Script that runs the aiogps example. On Python versions that can not run the
example it displays a message and exits.
"""

import sys


if __name__ == "__main__":
    # aiogps only available on Python >= 3.6
    if sys.version_info >= (3, 6):
        import example_aiogps
        example_aiogps.run()
    else:
        sys.exit("Sorry, aiogps is only available for Python versions >= 3.6")

# vim: set expandtab shiftwidth=4