repo.or.cz
/
python
/
dscho.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Improved some error messages for command line processing.
[python/dscho.git]
/
Demo
/
sgi
/
gl
/
glinfo.py
blob
dae99f1583463090d7646a335f34bf2a9dc13d18
1
#! /usr/bin/env 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
()