[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Weird problem
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Weird problem
- From: "Kai Kuehne" <kai.kuehne@xxxxxxxxx>
- Date: Sat, 14 Oct 2006 00:13:57 +0200
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Fri, 13 Oct 2006 18:14:10 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=TFjPvztDj3tikkHDX9anTBd4TZGXXgr75Q5yU7RlcButrQs55gz5gVGdlviiMKx92TT+7zFV1nZUb56pcx80YyRf36Tr/kEGkOy6oFB63lsMMWWko9TlgkresDEHoHaGj3v1JyLm+pErGJO6+mODTArm9bj+QtCzwQxEPg/vM3s=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi list.
Currently I'm wondering why this program produces nearly 100%
cpu load:
while 1:
for event in pygame.event.get():
if event.type == KEYDOWN or event.type == QUIT:
if event.key == K_ESCAPE:
import sys
sys.exit()
I tested my whole game and didn't think it would be this simple
code sample that produces this load. I'm not using clock here
since i thought *clock* would be the problem.
Have you an idea what the reason could be? I mean.. I just do
nothing other than looping and waiting for a key input. Why
is there such an high cpu-load? Is this 'normal'?
Thanks
Kai