Author: dmeyer
Date: Wed Mar 28 09:15:16 2007
New Revision: 2603

Added:
   trunk/base/test/config2.py

Log:
second config test

Added: trunk/base/test/config2.py
==============================================================================
--- (empty file)
+++ trunk/base/test/config2.py  Wed Mar 28 09:15:16 2007
@@ -0,0 +1,33 @@
+# -*- coding: iso-8859-1 -*-
+
+from kaa.config import Var, Group, Dict, List, Config, VarProxy
+
+config = Config(desc='mplayer configuration', schema=[
+
+  Var(name='activate', desc='activate backend', default=True),
+
+  Dict(name='dict', schema=Var(default=''), defaults = {'x': 'foo', 'y': 
'yyy'}),
+
+  Dict(name='dictgroup', schema=Group(schema = [
+    Var(name='x', default=True),
+    Var(name='y', default=True)])),
+
+  Dict(name='dictdict', schema=Dict(name='foo', schema=Var(default='')))
+
+])
+
+config.dict['f'] = 'd'
+config.dict['z'] = 'j'
+
+config.dictdict['a']['f'] = 'd'
+config.dictdict['b']['z'] = 'j'
+
+config.dictgroup['c'].x = False
+config.dictgroup['d'].y = 'j'
+
+print config.dictdict['a']['f']
+print 'save'
+config.save('x.cfg')
+
+print 'load'
+config.load('x.cfg')

-------------------------------------------------------------------------
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