Newer
Older
tconfpy / tconfpy-spec.txt
$Id: tconfpy-spec.txt,v 1.107 2005/01/13 22:21:15 tundra Exp $

                        tconfpy SPECIFICATION
                        =====================


*** This file is now out of date - see the code. ***

API
===

tconfpy.ParseConfig(FileName, InitialSymTbl, Debug=False, LiteralVars=False)

                 ---> [SymTable, ErrorMsgs, WarningMsgs, DebugMsgs, LiteralLines]


where,

FileName          --->  String

InitialSymbolTbl  --->  Dictionary in {varname:tconfpy.VarDescriptor, ...} format

Debug             --->  Turn on debug output.

LiteralVars       --->  Replace variable references in Literal Lines



RETURN VALUES
-------------


SymTable     --->  {varname:tconfpy.VarDescriptor, ...}

ErrorMsgs    --->  List of Error Messages

WarningMsgs  --->  List of Warning Messages

DebugMsgs    --->  List of Debug Messages (empty if Debug=False)

LiteralLines --->  Lines processed literally - w/vars replaced if LiteralVars=True


------------------------------------------------------------------------------


VARIABLE DESCRIPTOR
===================

class VarDescriptor:

    # Default variable type is a writeable string with no constraints
    def __init__(self):
        self.Value     = ""
        self.Writeable = True
        self.Type      = TYPE_STRING
        self.Default   = ""
        self.LegalVals = None
        self.Min       = None
        self.Max       = None


Possible Types:

TYPE_BOOL    = type(True)
TYPE_COMPLEX = type(1-1j)
TYPE_FLOAT   = type(3.14)
TYPE_INT     = type(1)
TYPE_STRING  = type('s')