rpirena/datalogger/stratosfix.py
stephan 94ed45f1f0 stratosfix: python3
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/cospi/host@8491 bc5caf13-1734-44f8-af43-603852e9ee25
2022-10-06 22:34:57 +00:00

11 lines
295 B
Python
Executable file

#! /usr/bin/python3
import sys, fileinput
pc=15
for l in fileinput.input():
ll=l.split(';')
if len(ll) > pc:
lll=ll[pc].split('.')
if len(lll)==2 and len(lll[1])<3:
ll[pc] = '.'.join((lll[0], '0'*(3-len(lll[1])) + lll[1]))
sys.stdout.write(';'.join(ll))