File: format_version.py

package info (click to toggle)
python-quantities 0.16.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 896 kB
  • sloc: python: 8,107; makefile: 75; sh: 3
file content (8 lines) | stat: -rw-r--r-- 167 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
import os
import sys

fn = sys.argv[1]
with open(fn) as f:
    s = f.read().lstrip('v').replace('-', '+', 1).replace('-', '.')
with open(fn, 'w') as f:
    f.write(s)