How could I get the file name and the permissions to a file as a string? This is on a Linux system.

os.access("myfilename", os.R_OK)

from Tkinter import *
def fileopenbox(msg=None, title=None, default=None):
    root = Tk()
    root.withdraw()
    f = tkFileDialog.askopenfilename(parent=root,title=title, initialfile=default)
    if not f: return None
    return os.path.normpath(f)

james.lu.75491856 What if I want all the permissions just as they're listed using ls -l?

lrwxr--r--
drwxr-w---

james.lu.75491856 What if I want all the permissions just as they're listed using ls -l?

import subprocess
v = subprocess.Popen(["ls","-l"])
This question has already been answered. Start a new discussion instead.