[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] interactively pygame
gen2n wrote:
I would like to know, how to interactively play with pygame in Python
command line.
After import pygame and pygame.init() and pygame.display.set_mode(xxx)
appears the output window. After typing other commands, this windows is
still inactive, not being able to bring it to front.
I cant see what it happened there. I can see iconizied button of this
window, but
without any chance to see its content.
It sounds like the problem is that you need to call:
pygame.display.update()
(or pygame.display.flip(), I think, if you're using double buffering)
to make what you've drawn visible. Unless you're running that command
frequently, as in a loop, the Pygame window will act broken. (I think
.update() also runs the event-handling code.) But you can still update
it manually.
Kris
Glad to get an easy question!