From 05fc9cea5d69b6a6664895a04796701f277619e9 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 7 Oct 1994 10:33:04 +0000 Subject: [PATCH] print gl variables --- Demo/sgi/gl/glinfo.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 Demo/sgi/gl/glinfo.py diff --git a/Demo/sgi/gl/glinfo.py b/Demo/sgi/gl/glinfo.py new file mode 100755 index 00000000000..2b6c356e1ba --- /dev/null +++ b/Demo/sgi/gl/glinfo.py @@ -0,0 +1,20 @@ +#! /usr/local/bin/python + +# Print the values of all values that can be inquired with getgdesc(). +# See man getgdesc() for a description. + +import gl +import GL + +def main(): + names = [] + maxlen = 0 + for name in dir(GL): + if name[:3] == 'GD_': + names.append(name) + maxlen = max(maxlen, len(name)) + for name in names: + print name + (maxlen - len(name))*' ' + '=', + print gl.getgdesc(getattr(GL, name)) + +main()