-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathglinfo.py
More file actions
32 lines (27 loc) · 815 Bytes
/
glinfo.py
File metadata and controls
32 lines (27 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from visual import *
import sys, os, time
print("This test of OpenGL options is useful mainly on Windows.")
print()
def print_mtime(f):
try:
print(" %-30s %s" % (f, time.ctime(os.path.getmtime(f))))
except:
pass
tried = {}
paths = sys.path
try:
windir = os.environ['windir']
paths = paths + [os.path.join(windir,'system'),
os.path.join(windir,'system32')]
except:
print('Windows directory not found.')
for dir in paths:
for file in ['cvisual.dll', 'visual\\__init__.py', 'visual\\graph.py', 'opengl32.dll']:
f = os.path.normcase(os.path.normpath(os.path.join(dir, file)))
if f not in tried:
tried[f] = print_mtime(f)
scene.title = "Renderer test"
scene.height = 2
scene.visible = 1
print(scene.info())
scene.visible = 0