问题 i want a python program that given a directory, it will return all directories within that directory that have 775 ( rwxrwxr-x ) permissions thanks! 回答1: Neither answer recurses, though it's not entirely clear that that's what the OP wants. Here's a recursive approach (untested, but you get the idea): import os import stat import sys MODE = "775" def mode_matches(mode, file): """Return True if 'file' matches 'mode'. 'mode' should be an integer representing an octal mode (eg int("755", 8) ->