def display(self): color = debug.get_color_set() print(" " + color['red'] + "[" + self.dest_option + "]" + color['default']) if self.optionnal == True: print("(OPTIONNAL)") if self.description != "": print(" " + self.description)
def display(self): color = debug.get_color_set() if self.option_small != "" and self.option_big != "": print(" " + color['red'] + "-" + self.option_small + "" + color['default'] + " / " + color['red'] + "--" + self.option_big + color['default']) elif self.option_small != "": print(" " + color['red'] + "-" + self.option_small + color['default']) elif self.option_big != "": print(" " + color['red'] + "--" + self.option_big + color['default']) else: print(" ???? ==> internal error ...") if self.description != "": print(" " + self.description) if len(self.list)!=0: hasDescriptiveElement=False for val,desc in self.list: if desc!="": hasDescriptiveElement=True break; if hasDescriptiveElement==True: for val,desc in self.list: print(" " + val + " : " + desc) else: tmpElementPrint = "" for val,desc in self.list: if len(tmpElementPrint)!=0: tmpElementPrint += " / " tmpElementPrint += val print(" { " + tmpElementPrint + " }")
def version(): color = debug.get_color_set() import pkg_resources debug.info("version: 0.0.0") foldername = os.path.dirname(__file__) debug.info("source folder is: " + foldername) exit(0)
def usage(): color = debug.get_color_set() # generic argument displayed : my_args.display() print(" Action availlable") print(" ex: " + sys.argv[0] + " -c init http://github.com/atria-soft/manifest.git") print(" ex: " + sys.argv[0] + " sync") exit(0)
def display(self): color = debug.get_color_set() print(" [" + color['blue'] + self.section + color['default'] + "] : " + self.description)
def get_porperties(self): color = debug.get_color_set() return " [" + color['blue'] + self.section + color['default'] + "]"
def usage(): color = debug.get_color_set() # generic argument displayed : my_args.display() exit(0)