Hide loader path print behind debug
authorNeil <neil@dip.sun.ac.za>
Wed, 7 Sep 2016 09:08:09 +0000 (11:08 +0200)
committerNeil <neil@dip.sun.ac.za>
Wed, 7 Sep 2016 09:08:09 +0000 (11:08 +0200)
tabakrolletjie/loader.py

index d37120fde77ed23431090626bb97b08f5679d96f..b2ff5270cb8b315203c86594c3e5194fc889fe43 100644 (file)
@@ -6,6 +6,8 @@ import os
 import pygame.image
 import pygame.display
 
+from .constants import DEBUG
+
 
 class Loader(object):
     """ Load data files from beneath a prefix. """
@@ -18,7 +20,8 @@ class Loader(object):
         path = "/".join(parts)
         rel_path = os.path.join(*path.split("/"))
         abs_path = os.path.join(self._prefix, rel_path)
-        print abs_path
+        if DEBUG:
+            print abs_path
         return abs_path
 
     def open_file(self, *parts):