Implemented several pre-defined variables to reflect running system.
1 parent 5a7d09d commit 187e70984b226d827c2b2f9d30419c7d12d34c15
@tundra tundra authored on 1 Apr 2004
Showing 1 changed file
View
24
tconfpy.py
 
# 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
 
#----------------------------------------------------------#
 
import os
import re
import sys
 
 
#----------------------------------------------------------#
# Aliases & Redefinitions #
NAMESPACE = "NAMESPACE" # Key used to get current namespace
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
INCLUDE = CONDINTRO + "include"
descript.Writeable = False
 
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
##########