[Avida-cvs] [Avida2-svn] r350 - trunk/source/python/AvidaGui2
kaben@myxo.css.msu.edu
kaben at myxo.css.msu.edu
Tue Oct 18 12:12:42 PDT 2005
Author: kaben
Date: 2005-10-18 15:12:42 -0400 (Tue, 18 Oct 2005)
New Revision: 350
Added:
trunk/source/python/AvidaGui2/descr.py
Log:
Added missing file.
Added: trunk/source/python/AvidaGui2/descr.py
===================================================================
--- trunk/source/python/AvidaGui2/descr.py 2005-10-18 19:11:59 UTC (rev 349)
+++ trunk/source/python/AvidaGui2/descr.py 2005-10-18 19:12:42 UTC (rev 350)
@@ -0,0 +1,17 @@
+
+import inspect
+
+DEBUG = True
+#DEBUG = False
+
+def descr(*details):
+ if DEBUG:
+ s = inspect.stack()
+ l = len(s) - 1
+ frame = s[1]
+ mthd = getattr(inspect.getargvalues(frame[0])[3]['self'], frame[3], None)
+ doc, cls, fnm = mthd is None and (None, None, None) or (mthd.im_func.__doc__, mthd.im_class.__name__, mthd.im_func.__name__)
+ if doc is None: doc = "<no docs.>"
+ pfx, txt = details is () and ('.'*l, doc) or (' '*l, str(details))
+ print "%s %s.%s: %s" % (pfx, cls, fnm, txt)
+
More information about the Avida-cvs
mailing list