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

Attachment 'tconfig.html'

Download

TConfig

Traits-based declarative configuration for programs

Fernando.Perez@Colorado.edu

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

  • Changes to the Traited instance propagate back into the ConfigObj.
  • A purely declarative interface for describing configurations.
  • Auto-generation of valid .conf files.
  • Hierarchical inclusion of files.
  • Automatic GUI editing of configuration objects.

Where is TConfig?

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

DEMO

New Attachment

File to upload
Rename to
Overwrite existing attachment of same name

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.