print gl variables

This commit is contained in:
Guido van Rossum 1994-10-07 10:33:04 +00:00
parent fa78560d6e
commit 05fc9cea5d
1 changed files with 20 additions and 0 deletions

20
Demo/sgi/gl/glinfo.py Executable file
View File

@ -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()