def printflags(list): """Print all legal flag names, which are given in list""" from xdrdef.nfs4_const import nfs_opnum4 command_names = [s.lower()[3:].replace('_', '') \ for s in nfs_opnum4.values()] list.sort() # First print command names print for s in list: if s in command_names: print s # Then everything else print for s in list: if s not in command_names: print s
def printflags(list): """Print all legal flag names, which are given in list""" from xdrdef.nfs4_const import nfs_opnum4 command_names = [s.lower()[3:].replace('_', '') \ for s in nfs_opnum4.values()] list.sort() # First print(command names) print for s in list: if s in command_names: print(s) # Then everything else print for s in list: if s not in command_names: print(s)