changeset 618:72865593bdc7

Make DEBUG an environment variable.
author Jeremy Thurgood <firxen@gmail.com>
date Fri, 06 May 2011 15:20:25 +0200
parents 2cd713ec8d59
children 4ffa9d159588
files skaapsteker/__main__.py skaapsteker/constants.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/skaapsteker/__main__.py	Wed May 04 01:33:49 2011 +0200
+++ b/skaapsteker/__main__.py	Fri May 06 15:20:25 2011 +0200
@@ -9,13 +9,17 @@
 from pygame.locals import SWSURFACE
 
 from . import options
-from .constants import SCREEN, DEBUG
+from .constants import SCREEN
 from .data import filepath
 from .engine import Engine
 from .levelscene import LevelScene
 from .menuscene import MenuScene
 from .sound import SoundSystem
 
+DEBUG = False
+if os.environ.get('DEBUG'):
+    DEBUG = True
+
 
 def _get_default_save_location():
     """Return a default save game location."""
--- a/skaapsteker/constants.py	Wed May 04 01:33:49 2011 +0200
+++ b/skaapsteker/constants.py	Fri May 06 15:20:25 2011 +0200
@@ -9,7 +9,6 @@
 CHANNELS = 2   # 1 == mono, 2 == stereo
 BUFFER = 1024  # audio buffer size in no. of samples
 
-DEBUG = True
 
 EPSILON = 1e-10