Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Mising documentation for uos.stat()

    Scheduled Pinned Locked Moved LoPy
    16 Posts 5 Posters 4.2k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bmarkusB Offline
      bmarkus @sakis
      last edited by

      @sakis said in Mising documentation for uos.stat():

      @bmarkus

      About your rest points, I agree that a docs link should be added to pycom.io. And we are trying hard to improve both our documentation and our firmware.

      After 21 days Pycom doc looks the same at https://docs.pycom.io/pycom_esp32/library/uos.html

      saying only

      Get the status of a file or directory.

      So, question is still valid, what is the return value? It is a question related to your own commercial product, not related to chip vendor, LoRa Alliance, CIA, KGB, ...

      What is about making a product usable for its customers and provide documentation? How do you expect to use it (expecting we get some free RAM and stable functions instead of changing it every week, introducing new bugs, etc.)?

      1 Reply Last reply Reply Quote 0
      • S Offline
        sakis
        last edited by

        @bmarkus @livius

        Fair points. We are planning to release an update to our documentation this week and documenting the return values of os.stat will be part of it.

        1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh
          last edited by

          The returned tuple has the structure defined for Python3 os.stat(). Only not all values are populated. useful values are:
          ST_MODE
          ST_SIZE
          ST_ATIME which is teh same as ST_MTIME and ST_CTIME
          The other values are set to zero, since they do not apply in the given environment, but the full structure is returned for compatibility.
          No reason to complain. If there is not special documentation, assume Python compliance as a plausible choice.

          L 1 Reply Last reply Reply Quote 1
          • L Offline
            livius @robert-hh
            last edited by

            @robert-hh said in Mising documentation for uos.stat():

            it work for you in that way?
            like os.stat().ST_SIZE?

            i must check this at home - i tested this previously and i remember that it does not know ST_SIZE

            think about people first, then computers

            1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh
              last edited by

              No, not that way. os.stat() return a 10-tuple, and the 7th, os_stat()[6], is the size. The symbolic indices are NOT set.

              L 1 Reply Last reply Reply Quote 0
              • L Offline
                livius @robert-hh
                last edited by

                @robert-hh said in Mising documentation for uos.stat():

                The symbolic indices are NOT set.

                and that is the point

                think about people first, then computers

                1 Reply Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh
                  last edited by

                  This is a Micro, fighting for every byte for memory. Too many features make it unusable.

                  L 1 Reply Last reply Reply Quote 0
                  • L Offline
                    livius @robert-hh
                    last edited by

                    @robert-hh
                    you have right but without doc you do not know what are that numbers in touple
                    you can guess but not for sure

                    but as @sakis say it will change in this week

                    think about people first, then computers

                    1 Reply Last reply Reply Quote 0
                    • sorenS Offline
                      soren
                      last edited by

                      Couldn't agree more.

                      robert-hhR 1 Reply Last reply Reply Quote 0
                      • robert-hhR Offline
                        robert-hh @soren
                        last edited by

                        @soren @bmarkus I see this as a semi-commercial product.
                        The documentation is not complete and sometimes wrong, since it was taken from the micropython.org port. Then some extension were made, but no-one seemed to have checked, whether everything fits. There seem to be a person now in Pycom.io dedicated to documentation, but maybe I'm wrong.
                        But if you like, you can contribute to the documentation. Sometimes, PRs to the documentation are noticed. In case of uos.stat(), the documentation is present.

                        bmarkusB 1 Reply Last reply Reply Quote 0
                        • bmarkusB Offline
                          bmarkus @robert-hh
                          last edited by

                          @robert-hh said in Mising documentation for uos.stat():

                          @soren @bmarkus I see this as a semi-commercial product.

                          It is a commercial product range offered in form of development and OEM moduls.

                          1 Reply Last reply Reply Quote 0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • 1 / 1
                          • First post
                            Last post

                          Pycom on Twitter

                          Pycom