omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Undocumented function?

    Pythonista
    3
    5
    4076
    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.
    • JadedTuna
      JadedTuna last edited by

      Module scene has a function called size which seems to return the size of the display, but I can't seem to find it here: http://omz-software.com/pythonista/docs/ios/scene ? : ]

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by

        http://omz-software.com/pythonista/docs/ios/scene.html#scene.Scene.size

        1 Reply Last reply Reply Quote 1
        • JadedTuna
          JadedTuna last edited by

          Heh, no. This is a method of a class Scene, and I am talking about the scene module itself (scene.size not scene.Scene.size)

          1 Reply Last reply Reply Quote 0
          • ccc
            ccc last edited by ccc

            https://forum.omz-software.com/topic/1506/undocumented-functions-and-classes Gives you code for automatically finding in documented functions and classes... It needs a bit of workout it is a step in the right direction..

            In scene, the thing that really drives me nuts is...

            >>> import scene
            >>> scene.size()
            Size(1024.00, 768.00)
            >>> scene.Size()
            Size(0.00, 0.00)
            scene.Scene().size
            Size(1024.00, 768.00)
            
            1 Reply Last reply Reply Quote 0
            • omz
              omz last edited by omz

              It's only there for backwards compatibility, and intentionally not documented, so it doesn't show up in code completion (which is partially based on the documentation index). I'd recommend using the equivalent get_screen_size() instead.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors