[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame.error: video system not initialized



Hi,

Check the if statements in the checkForHotkey function in main.py. In particular, look at the last else clause.

Lenard


Alex Hall wrote:
On 5/21/10, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
Hi Alex and Jake,

Passing the display surface around is not the problem. In fact it is
good style to keep a reference and pass it to other functions as an
argument. It lets you reuse those functions for other surfaces if you
want. I agree with Jake about seeing  the complete program before
hazarding a guess. It could be something as trivial as calling
pygame.event.get() after pygame.quit():
The zip file is at
http://www.gateway2somewhere.com/bs.zip
There is no dependency other than pyGame for now, except for in
speech.py which relies on win32 extensions. You can safely replace
every "from speech import speak" line with this method:
def speak(text):
 pygame.display.set_caption(text)
#end def
to avoid any dependencies you do not have.
I do not think I am calling quit too early. I call quit, but in an if
statement that checks for the quit event or the escape key.