diff options
author | necoro <> | 2006-10-09 19:16:29 +0000 |
---|---|---|
committer | necoro <> | 2006-10-09 19:16:29 +0000 |
commit | 12d50f5040d8cc0a5564ba7dc328aa58b595eac6 (patch) | |
tree | ac8783ec6e3581e44a550a5e6ac98af549407ecb /geneticone/helper.py | |
parent | f27145ec49c6f1cdd13db2f3bf389164f10ac828 (diff) | |
download | portato-12d50f5040d8cc0a5564ba7dc328aa58b595eac6.tar.gz portato-12d50f5040d8cc0a5564ba7dc328aa58b595eac6.tar.bz2 portato-12d50f5040d8cc0a5564ba7dc328aa58b595eac6.zip |
bla - prepared 0.4.0 ; added dialogs.py; extended some comments
Diffstat (limited to '')
-rw-r--r-- | geneticone/helper.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/geneticone/helper.py b/geneticone/helper.py index 4b2a207..a1acf42 100644 --- a/geneticone/helper.py +++ b/geneticone/helper.py @@ -11,6 +11,12 @@ import traceback, textwrap, os.path +DEBUG = True + +def set_debug (d): + global DEBUG + DEBUG = d + def debug(*args, **kwargs): """Prints a debug message including filename and lineno. A variable number of positional arguments are allowed. @@ -22,6 +28,8 @@ def debug(*args, **kwargs): (This function is adapted from Edward Jones as published under: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/279155)""" + if not DEBUG : return + stack = traceback.extract_stack() a, b, c, d = stack[-2] a = os.path.basename(a) |