Beispiel #1
0
            exit()

        if options.surround_value and options.burp:
            print("\nCannot choose more then one output format.\n")
            parser.print_help()
            exit()

        if options.replace_value and options.burp:
            print("\nCannot choose more then one output format.\n")
            parser.print_help()
            exit()

        gwt = GWTParser()

        if options.surround_value:
            gwt.surround_value = options.surround_value
        elif options.replace_value:
            gwt.replace_value = options.replace_value
        elif options.burp:
            gwt.burp = options.burp

        if options.write:
            if os.path.exists(options.write):
                print("Output file entered already exists")
                exit()

            fout = open(options.write, "w")
            gwt.fout = fout

        elif options.append:
            fout = open(options.append, "a")
     exit()
     
 if options.surround_value and options.burp:
     print( "\nCannot choose more then one output format.\n" )
     parser.print_help()
     exit()
     
 if options.replace_value and options.burp:
     print( "\nCannot choose more then one output format.\n" )
     parser.print_help()
     exit()
     
 gwt = GWTParser()
 
 if options.surround_value:
     gwt.surround_value = options.surround_value
 elif options.replace_value:
     gwt.replace_value = options.replace_value
 elif options.burp:
     gwt.burp = options.burp
 
 
 if options.write:
     if os.path.exists(options.write):
         print( "Output file entered already exists" )
         exit()
         
     fout = open( options.write, "w" )
     gwt.fout = fout
     
 elif options.append: