File: editor.py

package info (click to toggle)
pwdsphinx 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 856 kB
  • sloc: python: 3,793; javascript: 1,001; sh: 238; makefile: 74
file content (9 lines) | stat: -rwxr-xr-x 177 bytes parent folder | download
1
2
3
4
5
6
7
8
9
#!/usr/bin/env python

import sys

with open(sys.argv[1], 'r') as fd:
    data = fd.read()

with open(sys.argv[1], 'w') as fd:
    fd.write('\n'.join(sorted(data.split('\n'))))