diff --git a/tconfpy.py b/tconfpy.py index b954372..eba3679 100755 --- a/tconfpy.py +++ b/tconfpy.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "tconfpy" -RCSID = "$Id: tconfpy.py,v 1.137 2004/03/24 22:32:53 tundra Exp $" +RCSID = "$Id: tconfpy.py,v 1.138 2004/03/24 23:11:42 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -427,6 +427,19 @@ sym = var[1:-1] # Strip delimiters + # By default, all variable names assumed to be relative to + # current namespace context unless escaped with NSSEP + + # Look for an escape + + if sym and sym[0] == NSSEP: + sym = sym[1:] + + # Prepend the current namespace for all but the top level + + elif SymTable[NAMESPACE].Value: + sym = "%s%s%s" % (SymTable[NAMESPACE].Value, NSSEP, sym) + # Handle environment variables if sym and sym[0] == ENVIRO and sym[1:] in os.environ: line = line.replace(var, os.getenv(sym[1:])) @@ -800,6 +813,7 @@ # the current namespace # Handle absolute variable references + if l.startswith(NSSEP): l = l[1:]