def help(): sorted_flags = sorted(flags.items(), key=lambda kv: kv[0]) print("Base Flags:") for name, flag in filter(lambda kv: not isinstance(kv[1], CompoundFlag), sorted_flags): print(" %s: %s" % (name, flag.desc)) print() print("Compound Flags:") for name, flag in filter(lambda kv: isinstance(kv[1], CompoundFlag), sorted_flags): print(" %s: %s" % (name, flag.desc)) printList([c.name for c in flag.kids()], indent=8) print()
def help(): print("Base Flags:") for name in sorted(flags): if name == 'All': continue flag = flags[name] children = [c for c in flag.kids() ] if not children: print(" %s: %s" % (name, flag.desc())) print() print("Compound Flags:") for name in sorted(flags): if name == 'All': continue flag = flags[name] children = [c for c in flag.kids() ] if children: print(" %s: %s" % (name, flag.desc())) printList([ c.name() for c in children ], indent=8) print()
def help(): print("Base Flags:") for name in sorted(flags): if name == 'All': continue flag = flags[name] children = [c for c in flag.kids()] if not children: print(" %s: %s" % (name, flag.desc())) print() print("Compound Flags:") for name in sorted(flags): if name == 'All': continue flag = flags[name] children = [c for c in flag.kids()] if children: print(" %s: %s" % (name, flag.desc())) printList([c.name() for c in children], indent=8) print()
def help(): sorted_flags = sorted(flags.items(), key=lambda kv: kv[0]) print("Base Flags:") for name, flag in filter(lambda kv: isinstance(kv[1], SimpleFlag) and not kv[1].isFormat, sorted_flags): print(" %s: %s" % (name, flag.desc)) print() print("Compound Flags:") for name, flag in filter(lambda kv: isinstance(kv[1], CompoundFlag), sorted_flags): print(" %s: %s" % (name, flag.desc)) # The list of kids for flag "All" is too long, so it is not printed if name != "All": printList([ c.name for c in flag.kids() ], indent=8) else: print(" All Base Flags") print() print("Formatting Flags:") for name, flag in filter(lambda kv: isinstance(kv[1], SimpleFlag) and kv[1].isFormat, sorted_flags): print(" %s: %s" % (name, flag.desc)) print()