diff --git a/test-tc.py b/test-tc.py index 3435e88..d749bd4 100755 --- a/test-tc.py +++ b/test-tc.py @@ -2,7 +2,7 @@ # Copyright (c) 2003-2004 TundraWare Inc. All Rights Reserved. PROGNAME = "tconfpy Test Driver" -RCSID = "$Id: test-tc.py,v 1.112 2004/03/20 00:40:01 tundra Exp $" +RCSID = "$Id: test-tc.py,v 1.113 2004/03/20 00:47:59 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -18,6 +18,10 @@ import tconfpy import sys +# Translate booleans into equivlent writeable state + +TF = {True:"RW", False:"RO"} + ########## # Format and return contents of a variable descriptor @@ -28,8 +32,15 @@ retval = str(val) + " " * (15 - len(val)) - for v, p in ((d.Value, 10), (d.Writeable, 7), (d.Type, 17), (d.Default, 10), (d.LegalVals, 10), (d.Min, 10), (d.Max, 10)): - retval += str(v) + (p - len(str(v))) * ' ' + for v, p in ((d.Value, 10), + (TF[d.Writeable], 2), + (str(d.Type).split()[1][1:-2], 7), + (d.Default, 8), + (d.LegalVals, 8), + (d.Min, 8), + (d.Max, 8)): + + retval += str(v) + (p - len(str(v)) + 2) * ' ' return retval @@ -101,6 +112,7 @@ # Load the table with this entry symtbl[sym] = d +symtbl["fox"].Writeable = False if len(sys.argv) < 2: print BANNER