(Linux)
output = os.listdir()
In the above line of code I'm getting the name of the file(s) in a given directory, but how can I also get the permissions? This is what I want to see.
-rwxr-xr-x 1 garrett garrett 158 Nov 23 10:49 dirlist.py
drwxr-xr-x 2 garrett garrett 4096 Nov 23 10:32 test.dir
-rw-r--r-- 1 garrett garrett 0 Nov 23 10:32 test.txt