This is an archival dump of old wiki content --- see scipy.org for current material

TConfig

Traits-based declarative configuration for programs

Fernando Perez

Applied Mathematics

University of Colorado at Boulder

Traits

Typed variables with validation and automatic GUI generation:

from enthought.traits.api import HasTraits, Int, Float

class C(HasTraits):
    n = Int(10)
    x = Float(5.5)

a = C()

a.edit_traits()

ConfigObj

.ini / .conf style file read/write tool with nested sections and comment preservation:

# Top-level of the configuration
m = 1

# A section
[Protocol]
    ptype = 'http'

    # A subsection
    [[Handler]]
        key = 'foo'

TConfig = Traits + ConfigObj

Where is TConfig?

http://ipython.scipy.org/svn/ipython/ipython/branches/saw/sandbox/tconfig

DEMO

SciPy: SciPy2007/TConfig (last edited 2015-10-24 17:48:23 by anonymous)