Author: dmeyer
Date: Wed Feb 14 19:52:43 2007
New Revision: 2488

Modified:
   trunk/base/src/config.py

Log:
create functions to set default and get desc without using _ vars

Modified: trunk/base/src/config.py
==============================================================================
--- trunk/base/src/config.py    (original)
+++ trunk/base/src/config.py    Wed Feb 14 19:52:43 2007
@@ -28,7 +28,8 @@
 #
 # -----------------------------------------------------------------------------
 
-__all__ = [ "Var", "Group", "Dict", "List", "Config" ]
+__all__ = [ "Var", "Group", "Dict", "List", "Config", "set_default",
+            "get_description" ]
 
 # Python imports
 import os
@@ -839,3 +840,16 @@
             # Add a slower timer in case it doesn't reappear right away.
             self._watch_timer.start(3)
 
+
+def set_default(group, var, value):
+    """
+    Set default value for var in group.
+    """
+    group._cfg_get(var)._cfg_set(value, default=True)
+
+
+def get_description(group, var):
+    """
+    Get the description for var in group.
+    """
+    return group._cfg_get(var)._desc

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to