File: read_file.py

package info (click to toggle)
python-nmea2 1.19.0-3
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 420 kB
  • sloc: python: 2,948; makefile: 3
file content (11 lines) | stat: -rw-r--r-- 262 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
import pynmea2

file = open('examples/data.log', encoding='utf-8')

for line in file.readlines():
    try:
        msg = pynmea2.parse(line)
        print(repr(msg))
    except pynmea2.ParseError as e:
        print('Parse error: {}'.format(e))
        continue