SHOW:
|
|
- or go back to the newest paste.
| 1 | #!/usr/bin/env python | |
| 2 | from sys import stdin, stdout | |
| 3 | ||
| 4 | value = None | |
| 5 | for line in stdin: | |
| 6 | if line.startswith("t="):
| |
| 7 | value = int(line[2:]) / 1000.0 | |
| 8 | break | |
| 9 | if value: | |
| 10 | stdout.write("{0},\n".format(value))
| |
| 11 | - | # On linux: "cat foo|python nums.py >>data.csv" |
| 11 | + | |
| 12 | # On linux (untested): "cat foo|python nums.py >>data.csv" | |
| 13 | # On windows: "type foo.txt|python nums.py >>data.csv" |