(mode)
return "".join(perm)
Convert a file's mode to a string of the form '-rwxrwxrwx'.
Convert a file's mode to a string of the form '-rwxrwxrwx'.
Convert a file s mode to a string of the form - rwxrwxrwx .
def filemode(mode):
    """Convert a file's mode to a string of the form '-rwxrwxrwx'."""
    perm = []
    for table in _filemode_table:
        for bit, char in table:
            if mode & bit == bit:
                perm.append(char)
                break
        else:
            perm.append("-")
    return "".join(perm)
def filemode ( mode ) : perm = [ ] for table in _filemode_table : for bit , char in table : if mode & bit == bit : perm . append ( char ) break else : perm . append ( "-" ) return "" . join ( perm )