example_aiogps_run 679 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # Copyright 2019 Grand Joldes (grandwork2@yahoo.com).
  4. #
  5. # This file is Copyright 2019 by the GPSD project
  6. #
  7. # SPDX-License-Identifier: BSD-2-clause
  8. # This code runs only under Python 3.x for x >= 6.
  9. """
  10. Script that runs the aiogps example. On Python versions that can not run the
  11. example it displays a message and exits.
  12. """
  13. import sys
  14. if __name__ == "__main__":
  15. # aiogps only available on Python >= 3.6
  16. if sys.version_info >= (3, 6):
  17. import example_aiogps
  18. example_aiogps.run()
  19. else:
  20. sys.exit("Sorry, aiogps is only available for Python versions >= 3.6")
  21. # vim: set expandtab shiftwidth=4