Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05fc9ce

Browse files
committed
print gl variables
1 parent fa78560 commit 05fc9ce

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Demo/sgi/gl/glinfo.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#! /usr/local/bin/python
2+
3+
# Print the values of all values that can be inquired with getgdesc().
4+
# See man getgdesc() for a description.
5+
6+
import gl
7+
import GL
8+
9+
def main():
10+
names = []
11+
maxlen = 0
12+
for name in dir(GL):
13+
if name[:3] == 'GD_':
14+
names.append(name)
15+
maxlen = max(maxlen, len(name))
16+
for name in names:
17+
print name + (maxlen - len(name))*' ' + '=',
18+
print gl.getgdesc(getattr(GL, name))
19+
20+
main()

0 commit comments

Comments
 (0)