Python Forum
where is documentation for stat result attributes in PDF docs?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
where is documentation for stat result attributes in PDF docs?
#1
in The Python Library Reference there are three places i find lower case "st_mode". all three are in code samples. i find the same for lower case "st_size". where are these attributes of os.stat (and similar) result supposed to be documented? i find these strings in the online documentation, but i use a offline downloaded copy in PDF format that may be missing content. does anyone know where this documentation is in the offline copy? i have PDF version 3.7.4 instead of the online version 3.11.3. but these attributes must exist in 3.7.4 if they showed code samples using them. can someone tell me what is going on here? can anyone tell me what is the proper way to get these values from a stat result (i am getting it yielded from a generator) and which documentation from the PDF ones i would find how this is to be done. note that accessing these attributes works and gets the correct values in the Python version 3.8.10 i am using under Ubuntu 20.04 LTS. this is just a documentation issue. Confused
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
In the documentation for 3.7.16 (available for download), library.pdf, page 530, the class os.stat_result
I don't know what stopped you from just using find....
Also, all stat attributes are listed in the Index section on page 1909
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
i did use find (Ctrl+f) on the 3.7.4 version. that's how i found the 3 cases of it in code samples. since was a cases insensitive feature it also matched many upper-case incidents which i skipped as the lower-case attribute was more convenient. using dir() showed me the lower case attribute. right now i don't have the file space to download another doc version (3.7.16) unless it is to replace one i already have. i am currently an LTS behind and am waiting for a new LTS next year. or i might install 22.04 sooner and skip 24.04. whatever Python is on whichever Ubuntu i end up installing is the Python PDF docs version i want to get. but i don't know which that will be, right now. that Ubuntu version will go onto a new layout scheme to get another terabyte of working space, unless i end up with all new hardware with larger storage (this will be my transition to solid state, whenever).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
(May-14-2023, 11:58 PM)Skaperen Wrote: whatever Python is on whichever Ubuntu i end up installing is the Python PDF docs version i want to get.
Why don't you install the html documentation locally? It has an efficient search form. Install it with
Output:
sudo apt install python3.10-doc
Browse with
Output:
xdg-open /usr/share/doc/python3.10-doc/html/index.html
Searching st_mode gives os.stat_result.st_mode as the first hit.
Reply
#5
(May-14-2023, 11:58 PM)Skaperen Wrote: i did use find (Ctrl+f) on the 3.7.4 version.
OK, I downloaded 3.7.4 docs from https://www.python.org/ftp/python/doc/3.7.4/

And using find in library.pdf I found the same - the class os.stat_result and all stat attributes on page 558. And they go till page 560
They are also listed in Index at page 1989
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#6
i found my search error. generally when i search for an attribute i include a dot (.) in front of the name. but this documentation listed the attribute names without a dot so they did not match the search.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  doc for os.stat() lacks exceptions Skaperen 1 2,676 Feb-21-2021, 09:25 AM
Last Post: Larz60+
  frozenset.copy() docs wrong Skaperen 8 3,671 Apr-08-2020, 12:56 AM
Last Post: Skaperen
  annoying conflict: stat Skaperen 2 2,211 Dec-26-2019, 06:04 AM
Last Post: Skaperen
  looking up docs for open file methods Skaperen 3 2,455 Nov-10-2019, 01:08 AM
Last Post: Skaperen
  Operator Precedence Direction in Docs blitz4 3 3,139 Mar-11-2018, 06:15 AM
Last Post: wavic
  Docs missing info? tozqo 3 4,446 Jun-21-2017, 06:50 AM
Last Post: Kebap

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020