yml2/yml2proc
changeset 53 b94d4c5b9496
parent 52 b4a9a3122abb
child 54 cefcaac752c9
equal deleted inserted replaced
52:b4a9a3122abb 53:b94d4c5b9496
    34         except:
    34         except:
    35             msg = u(msg) + u"\n"
    35             msg = u(msg) + u"\n"
    36     if type(msg) is unicode:
    36     if type(msg) is unicode:
    37         msg = codecs.encode(msg, sys.stderr.encoding)
    37         msg = codecs.encode(msg, sys.stderr.encoding)
    38     sys.stderr.write(msg)
    38     sys.stderr.write(msg)
       
    39 
       
    40 
       
    41 def main():
       
    42     pass
    39 
    43 
    40 optParser = OptionParser()
    44 optParser = OptionParser()
    41 optParser.add_option("-C", "--old-syntax", action="store_true", dest="old_syntax",
    45 optParser.add_option("-C", "--old-syntax", action="store_true", dest="old_syntax",
    42         help="syntax of YML 2 version 1.x (compatibility mode)", default=False)
    46         help="syntax of YML 2 version 1.x (compatibility mode)", default=False)
    43 optParser.add_option("-D", "--emit-linenumbers", action="store_true", dest="emitlinenumbers",
    47 optParser.add_option("-D", "--emit-linenumbers", action="store_true", dest="emitlinenumbers",
   238         w(u"XML error: " + u(entry.message) + u"\n")
   242         w(u"XML error: " + u(entry.message) + u"\n")
   239     sys.exit(5)
   243     sys.exit(5)
   240 except Exception as msg:
   244 except Exception as msg:
   241     w(msg)
   245     w(msg)
   242     sys.exit(5)
   246     sys.exit(5)
       
   247 
       
   248 
       
   249 if __name__ == "__main__":
       
   250     sys.exit(main())
       
   251