summaryrefslogtreecommitdiffstats
path: root/Demo/sgi/gl
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-10-07 10:33:04 (GMT)
committerGuido van Rossum <guido@python.org>1994-10-07 10:33:04 (GMT)
commit05fc9cea5d69b6a6664895a04796701f277619e9 (patch)
tree495d2dc879525cf00de5f92f4341f3a7e43b1f5a /Demo/sgi/gl
parentfa78560d6ebf46dfe70adaff34f6f4938b1963bd (diff)
downloadcpython-05fc9cea5d69b6a6664895a04796701f277619e9.zip
cpython-05fc9cea5d69b6a6664895a04796701f277619e9.tar.gz
cpython-05fc9cea5d69b6a6664895a04796701f277619e9.tar.bz2
print gl variables
Diffstat (limited to 'Demo/sgi/gl')
-rwxr-xr-xDemo/sgi/gl/glinfo.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/Demo/sgi/gl/glinfo.py b/Demo/sgi/gl/glinfo.py
new file mode 100755
index 0000000..2b6c356
--- /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()