diff --git a/tconfpy.py b/tconfpy.py index 0c5a675..dbb28a6 100755 --- a/tconfpy.py +++ b/tconfpy.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "tconfpy" -RCSID = "$Id: tconfpy.py,v 1.154 2004/04/01 20:38:03 tundra Exp $" +RCSID = "$Id: tconfpy.py,v 1.155 2004/04/01 21:13:00 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -34,6 +34,7 @@ import os import re +import sys #----------------------------------------------------------# @@ -74,6 +75,13 @@ NSSEP = '.' # Namespace separator character NOTEQUIV = r"!=" # Used in conditional tests +# Pre-Defined System Symbols + +PREDEFINTRO = '.' +PLATFORM = PREDEFINTRO + "PLATFORM" +OSTYPE = PREDEFINTRO + "OSTYPE" +PYTHONVERSION = PREDEFINTRO + "PYTHONVERSION" + # Control and conditional symbols CONDINTRO = '.' # Conditional introducer token @@ -209,6 +217,20 @@ SymTable[sym] = descript +# Add the predefined symbols + +v = sys.version_info + +for var, val in ((PLATFORM, sys.platform), + (OSTYPE, os.name), + (PYTHONVERSION,"%s.%s.%s" % (v[0], v[1], v[2])) + ): + + d = VarDescriptor() + d.Value = val + d.Writeable = False + SymTable[var] = d + ########## # Error, Warning, And Debug Message Strings Stored In A Global Dictionary