Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # Filename: gpsget_ver1.py
- import os
- import time
- source = "/dev/ttyUSB0"
- target_dir = "tmp/gps/"
- target = target_dir + time.strftime('%Y-%m-%d-%H%M%S') + '.gpx'
- gpsbabel_command = "gpsbabel -t -r -w -i m241 -f %s -o gpx -F %s" % (source, target)
- print os.system(gpsbabel_command)
- if os.system(gpsbabel_command) == 0:
- print 'Successful get from', source
- else:
- print 'FAILED'
Add Comment
Please, Sign In to add comment