Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--blocku.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/blocku.py b/blocku.py
index 52d16cc..40f4830 100644
--- a/blocku.py
+++ b/blocku.py
@@ -2,7 +2,10 @@
import pygame, random, os.path
from pygame.locals import *
from pygame import *
-#import gtk
+
+
+try: import gtk
+except ImportError: gtk = None
#see if we can load more than standard BMP
if not pygame.image.get_extended():
@@ -148,8 +151,8 @@ class Game:
while self.running:
# Pump GTK messages.
- #while gtk.events_pending():
- # gtk.main_iteration()
+ while gtk and gtk.events_pending():
+ gtk.main_iteration()
# Pump PyGame messages.
for event in pygame.event.get():