def choices(self):
        """Menu options for new configuration files
        """
        print("| {0}K{1}{2}eep the old and .new files, no changes".format(
            self.red, self.endc, self.br))
        print("| {0}O{1}{2}verwrite all old configuration files with new "
              "ones".format(self.red, self.endc, self.br))
        print("|  The old files will be saved with suffix .old")
        print("| {0}R{1}{2}emove all .new files".format(
            self.red, self.endc, self.br))
        print("| {0}P{1}{2}rompt K, O, R, D, M option for each single "
              "file".format(self.red, self.endc, self.br))
        print("| {0}Q{1}{2}uit from menu".format(self.red, self.endc, self.br))
        self.msg.template(78)
        try:
            choose = raw_input("\nWhat would you like to do [K/O/R/P/Q]? ")
        except EOFError:
            print("")
            raise SystemExit()
        print("")
        if choose in ("K", "k"):
            self.keep()
        elif choose in ("O", "o"):
            self.overwrite_all()
        elif choose in ("R", "r"):
            self.remove_all()
        elif choose in ("P", "p"):
            self.prompt()
def choices ( self ) : print ( "| {0}K{1}{2}eep the old and .new files, no changes" . format ( self . red , self . endc , self . br ) ) print ( "| {0}O{1}{2}verwrite all old configuration files with new " "ones" . format ( self . red , self . endc , self . br ) ) print ( "|  The old files will be saved with suffix .old" ) print ( "| {0}R{1}{2}emove all .new files" . format ( self . red , self . endc , self . br ) ) print ( "| {0}P{1}{2}rompt K, O, R, D, M option for each single " "file" . format ( self . red , self . endc , self . br ) ) print ( "| {0}Q{1}{2}uit from menu" . format ( self . red , self . endc , self . br ) ) self . msg . template ( 78 ) try : choose = raw_input ( "\nWhat would you like to do [K/O/R/P/Q]? " ) except EOFError : print ( "" ) raise SystemExit ( ) print ( "" ) if choose in ( "K" , "k" ) : self . keep ( ) elif choose in ( "O" , "o" ) : self . overwrite_all ( ) elif choose in ( "R" , "r" ) : self . remove_all ( ) elif choose in ( "P" , "p" ) : self . prompt ( )
Menu options for new configuration files