All pastes #191309 Raw Edit

Something

public text v1 · immutable
·published 2006-10-04 21:03 UTC
rendered paste body
def getsubdirs(dir):
    if (not os.path.isdir(dir)):
        raise IOError, 'getsubdirs() requires a directory'
    files = os.listdir(dir)
    return filter(os.path.isdir, files)