Corrected code so that both NAMESPACE= and .NAMESPACE= work
equivalently.
1 parent b947224 commit 1a2bdf3bb707ee2b59d2b2070df1f808eb6465a2
@tundra tundra authored on 24 Mar 2004
Showing 1 changed file
View
24
tconfpy.py
 
# Program Information
 
PROGNAME = "tconfpy"
RCSID = "$Id: tconfpy.py,v 1.138 2004/03/24 23:11:42 tundra Exp $"
RCSID = "$Id: tconfpy.py,v 1.139 2004/03/24 23:34:59 tundra Exp $"
VERSION = RCSID.split()[2]
 
# Copyright Information
 
 
# Load variable into the symbol table
else:
 
# Munge the variable name to incoroprate
# Munge the variable name to incorporate
# the current namespace
 
# Handle absolute variable references
 
if l.startswith(NSSEP):
l = l[1:]
 
# The NAMESPACE variable is special - It is presumed to reset
# the top level namespace.
elif l == NAMESPACE:
if l in (NAMESPACE, NSSEP+NAMESPACE):
 
if l == NSSEP + NAMESPACE:
l=NAMESPACE
# Save the new namespace
SymTable[NAMESPACE].Value = r
 
# Add to unique list of namespaces seen
if r not in SymTable[NAMESPACE].LegalVals:
SymTable[NAMESPACE].LegalVals.append(r)
 
# Handle absolute variable references
 
elif l.startswith(NSSEP):
l = l[1:]
 
# In all other cases prepend current namespace
else:
ns = SymTable[NAMESPACE].Value