On scrollable tkinter objects in Python, when you call .yview(), it returns their current 'position'. I can't make heads or tails of what it returns, though. For example, when scrolled to the beginning of one of my elements, it returns (0.0, 0.4662309368191721), and when at the end, (0.5337690631808278, 1.0).
What do these numbers mean? Why are there two of them? It seems to me like it'd make more sense if there was only a single number, from 0(beginning) to 1(end).
The two numbers represent the fractional part of the data that is visible. A value of 0 (zero) means you are at the top (or left, in the case of xview), and a value of 1 (one) means bottom (or right). So, for example, if the very middle of the document were at the top of the screen, the first number would be .5. If a document that is three times as long as the screen was perfectly centered, the numbers would be something like (.333,.666) meaning the top one third is scrolled off of the screen, and the bottom one third is scrolled off the screen.
What do the values in obj.yview() mean?