Forum Archive

Undocumented function?

JadedTuna

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 ? : ]

ccc

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

JadedTuna

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)

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)
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.