root/ipython/branches/saw/sandbox/tconfig/simpleconf.py

Revision 2636, 472 bytes (checked in by fperez, 3 years ago)

Add little demo and fix bug in writeAll

Line 
1 """Toy example of a TConfig-based configuration description."""
2
3 import enthought.traits.api as T
4 from tconfig import TConfig
5
6 # This is the class declaration for the configuration:
7
8 class SimpleConfig(TConfig):
9     """Configuration for my application."""
10
11     datafile = T.Str('data.txt')
12     solver = T.Trait('Direct','Iterative')
13
14     class Protocol(TConfig):
15         """Specify the Protocol"""
16
17         ptype = T.Trait('http','ftp','ssh')
18         max_users = T.Int(1)
Note: See TracBrowser for help on using the browser.