3 from __future__ import print_function
6 from getopt import getopt
9 python cat.py -o OUTFILE FILE1 FILE2 .... FILEn
12 cat FILE1 FILE2 ... .FILEn > OUTFILE
13 If the -o argument is not given, writes to stdout.
18 (options, args) = getopt(sys.argv[1:], "ho:")
19 for (opt, param) in options:
28 # always write unix line endings, even on windows
29 out = open(outfile, "wb")
32 # accept both windows and unix line endings, since it can happen that we
33 # are on unix, but the file has been written on windows or vice versa.
36 # this does always write unix line endings since the file has
37 # been opened in binary mode. This is needed since both gettext
38 # and our .pot file manipulation scripts assume unix line ends.