+output_type = 'windows'
+
+try:
+ optlist, args = getopt.getopt(sys.argv[1:], '', [ 'win', 'unix' ])
+ if filter(lambda x: x[0] == '--unix', optlist):
+ output_type = 'unix'
+except getopt.error, e:
+ sys.stderr.write(str(e) + "\n")
+ sys.exit(1)
+
+if output_type == 'windows':
+ # Output REG file header.
+ sys.stdout.write("""REGEDIT4