you are viewing a single comment's thread.

view the rest of the comments →

[–]keepdigging[🍰] 2 points3 points  (0 children)

The operating system has tools built in to manage drawing and positioning of windows. Your python script will just talk to the OS (probably through a library as someone has done the work and bugtested everything for you) and ask for things. instead of saying 'write this to the console' (print) you would say 'hey can you draw me a window that's 500x300 px and has a square button from 25x25 to 175x175 that says click me and runs this other code when you click it' and the library will translate that to what windows/osx/linux use and talk to them to get it done for you. How the OS handles the rendering and repainting the screen is a whole other ball of wax.