Include module for desktop build

This commit is contained in:
Ruud
2012-09-09 17:29:09 +02:00
parent 89426d75ab
commit 36f653f65b
88 changed files with 9967 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env python
# Copyright (c) 2005-2010 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
from pyutil import lineutil
import sys
def main():
if len(sys.argv) > 1 and "-s" in sys.argv[1:]:
strip = True
sys.argv.remove("-s")
else:
strip = False
if len(sys.argv) > 1 and "-n" in sys.argv[1:]:
nobak = True
sys.argv.remove("-n")
else:
nobak = False
if len(sys.argv) > 1:
pipe = False
else:
pipe = True
if pipe:
lineutil.lineify_fileobjs(sys.stdin, sys.stdout)
else:
for fn in sys.argv[1:]:
lineutil.lineify_file(fn, strip, nobak)
if __name__ == '__main__':
main()