This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author scrool
Recipients eryksun, scrool
Date 2020-05-17.09:33:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589707997.99.0.792559410017.issue40644@roundup.psfhosted.org>
In-reply-to
Content
Thanks for exhaustive response!

The way how I understand this is it might be beneficial to extend request to get text representation of file attributes on other architectures.

I didn't know about statx() syscall. From what I can tell there is no binary, similar to 'stat', that would print attributes of a file in a text form.

I guess there is no common way to print those attributes from statx()?

---

I see that filemode() works consistently across platforms even on Windows. I guess I could use this everywhere:

stat.filemode(stat.S_IFMT(os.lstat(n).st_mode)

---

And finally modes on Windows won't be ever complete in filemode() because of lack of file modes. I still have some approximation with users' mode (rwx):

format(stat.filemode(stat.S_IMODE(os.lstat(n).st_mode))[1:4]

To get:

r - as readable file or link
w - as not readonly
x - executable by file extension

---

Is that accurate summary? I'm wondering if it would make sense to rename this issue to leave out Windows?
History
Date User Action Args
2020-05-17 09:33:18scroolsetrecipients: + scrool, eryksun
2020-05-17 09:33:17scroolsetmessageid: <1589707997.99.0.792559410017.issue40644@roundup.psfhosted.org>
2020-05-17 09:33:17scroollinkissue40644 messages
2020-05-17 09:33:17scroolcreate